A pin is a tactical theme in chess. A pin occurs when an attack on a piece is blocked by another piece of the same color.

For an example, imagine you are white. On three consequtive squares, there is the white queen, a white knight, and a black rook. The white knight is pinned, because if it is moved black will be able to take white's queen.

An absolute pin occurs when a piece is pinned to the king. Moving out of an absolute pin is illegal. A relative pin occurs when a piece is pinned to any piece other than the king.

Here is a sample game that contains a pin. It also shows that moving out of an absolute pin can be beneficial.

1. e4 e5
2. Nf3 d6
3. Bc4 Nc6
4. Nc3 Bg4

White's knight on f3 is now pinned. If it is moved, black can capture white's queen.

5. Nxe5!

Sacrificing the queen.

5. ... Bxd1?
6. Bxf7+ Ke7
7. Nd5#

Ouch.