Why does such a confusing rule exist? Before the 15th century, most people played by rules which didn't allow the pawns to move two squares on their first move. When the two square pawn move was added to speed up the opening phase of the game, it was noticed that it was now possible for a pawn to sneak by an enemy pawn on an adjacent file -- something that was never possible when pawns plodded along at one square per move.
The solution was en passant, a move that allows a pawn which has moved two squares to be captured as though it only moved one.
The diagram above illustrates how en passant works. The following conditions must all be present for an en passant capture to be legal:
- The capturing pawn must be on its fifth rank.
- The opponent must move a pawn two squares, landing the pawn directly alongside the capturing pawn on the fifth rank.
- The capture must be made immediately; you only get one chance to capture en passant.
If all those conditions are met, an en passant capture is possible.
In the diagram above, Black's pawn has just moved from c7 to c5, landing it directly next to White's pawn on d5. If White wishes, he may capture Black's pawn by moving his pawn to c6 -- capturing the pawn as though it had only moved one square. However, if he chooses not to capture immediately, White loses this option.
The above diagram also shows a second example from Black's perspective. White has just moved a pawn from f2 to f4. Black's pawn on g4 may capture White's pawn by moving to f3 on the very next turn. If Black chooses not to make this capture, he loses the ability to capture en passant.