Above in figure 1. We have a queen attacking in several directions from b2 The queen attacks diagonally up and to the right through c3, d4, e5, at e5 it hits the rook and no longer directly attacks along this diagonal, but it does continue to pin the rook to whatever black piece may be behind the rook along the same diagonal, in this case f6 is empty, g7 is empty and h8 is occupied by the king, so the queen pins the e5 rook to the black king. This is an absolute pin as long as the king is behind the rook on the same diagonal. The rook cannot move until the king finds a new square that isn’t g7 or f6. It is absolute because the rook cannot move out of the way, only if it were a bishop could it move along the diagonal pin in this instance.
Since the queen also moves like a rook, b3 is also attacked, which is blacks bishop! The bishop is pinned to the rook on b8. This is not an absolute pin because the bishop can move freely without breaking the rules of chess, if black doesn’t mind risking the rook behind the line of attack from the queen it is perfectly acceptable to move the b3 bishop. This is a relative pin. The bishop on b3 is relatively pinned to the rook on b8. It is not an absolute pin because the bishop can break the pin without incurring fire on his king.
In this theoretical position black would want to save his rook with the other rook and allowing the bishop to be captured. With good play black may draw since two rooks might fend off the queen long enough for the 50 move rule to kick in, or a 3 fold repetition.
Image Source: Arlington chess club.
When a piece is in an absolute pin it can sometimes move, but only along the line of attack from the pinning piece and the king whether that be a diagonal (bishop and queen mooves), or a straight line (rook and queen moves). Provided the piece is in a diagggonal pin and a diagonal moving piece it can capture the piece causing the pin (theoretically for certain), and if the pinning attack is given by a rook or queen and is a rook type attack then the piece in pin if it is a rook can capture the attacking pinning piece, or alternatively move along that pin.
In a relative pin the piece that is pinned can still move in all of it’s regular ways except moving it may incure damage to other pieces!!
Above you can see the rook attacks the bishop on d6 and behind it is the queen!! Black pieces does not want to move his bishop right now but he can if he chooses because the queen is a relative piece and can be lost but not for good reason!! Instead black would want to move his queen out of the pin and then find a square for his bishop or continue as normal. From this we can learn that pins are bad if it is your piece that is pinned.
Again it is a relative pin!! The bishop can move but would prefer not to.
Above the rook on h3 has an absolute pin on the bishop on h6. The bishop cannot move legally according to the known rules of chess because black would make a move leaving himself in check.
Being white to move white would like to exploit that pin with g4-g5, and next move taking h6 getting a bishop for the pawn, also harming blacks king safety causing him to open the lines of attack to his king.
If it were black to move I would suggest moving the king to g8 possibly breaking the pin and relieving the bishop.