At some point you will hit your ball into a place where you don't have a shot. Trying to put the club on the ball just isn't possible or would be a very bad idea. In this case, you can declare an unplayable lie and get relief, but under the penalty of one stroke. The options are pretty simple, and there are three.
a. hit another shot from the spot where the ball you just hit was played, or
b. take a drop within two club-lengths of where the ball lies, but not nearer to the hole, or
c. take a drop on the line connecting the hole and where the ball lies, extended as far backwards from the where the ball lies as you wish.
Again, all these relief options come with a penalty of one stroke.
If you declare an unplayable lie in a bunker, relief under b. and c. must be taken in the bunker.
You may declare your ball to be unplayable anywhere on the course except when it is in a water hazard.
You may clean your ball before dropping it, or substitute another ball.
The player is the sole judge of whether the ball is unplayable.
That's about it on unplayable lies. This Rule 28.
I used this rule once to help myself out. I hit the ball off the tee of a par-3 hole to the left of the green on a bank of grass with a deep bunker between the ball and the green. I chunked my second shot into the bunker, against a deep vertical face. Instead of trying to take a stroke or two to get out of the bunker, I declared an unplayable lie, took relief under option a. on the bank of grass (where I hit the shot originally), and chipped in for a bogey.
Let me recommend that if your ball comes to rest against an exposed tree root, that you declare an unplayable lie and take relief. Hitting a tree root with your full swing is a good way to sprain your wrist or worse.
Deep Rules: If a ball is declared unplayable and when dropped rolls into a lie that is also unplayable, the player may invoke the unplayable lie rule again.
It is not necessary to find a ball for it to be declared unplayable. In this case, the player may take relief under option a. Relief under options b. and c. may not be taken unless the ball is found.
The procedures involving the combination of wrong balls and unplayable lies are so involved, I don't think you want me to explain it. Just avoid the whole affair by putting a mark on your ball and making sure the ball you find is really yours.