The best defense against an absolute pin is to prevent it from arising by keeping an eye on lines leading away from your king, on the board in front of you and as it would look after any checks or captures that might be played. If you nevertheless have the misfortune to find one of your pieces pinned, there are two most usual ways by which escape might be had. One is to take the pinning piece; if the pin is properly built this will involve a sacrifice on your part, but perhaps the pinned piece can make up for it with a capture once it is freed. The other method is to attack the pinning piece while giving check at the same time, and then to capture it a move later. Time is of the essence when a pin is in place; if you give your opponent a move, your pinned piece often will be lost. Operating with checks keeps the initiative and postpones the execution. And there are one or two other methods, as we shall see.
In the example on the left, Black’s pawn on g7 is pinned and so can’t take White’s queen on f6; White is poised to play Qxg7#. Can the pin be broken? Easily: it is imposed by a single enemy piece that Black can take with QxR+. White can't play Qxg7 (with cover from his bishop) because now he's in check. Instead he has to play KxQ. This looks like a large sacrifice for Black, but now it’s his move again, and with his pawn on g7 freed from the pin he can play g7xQ—not only avoiding mate but emerging with a rook (minus a pawn).