When a pawn tries to sneak past an enemy pawn to avoid capture, there's a move of which many beginners are often unaware.
Take a look at the accompanying diagram. A black pawn has advanced to its fifth rank. In the adjacent column, a white pawn, still on its initial square, is preparing to make a two-move jump to avoid capture.
However, the en passant rule prevents a pawn from avoiding capture by another pawn in this manner, and allows the black pawn to capture the white pawn exactly as if the white pawn had moved only one square.
This move can only be carried out on the move immediately following the white pawn's move.
Note that only another pawn may capture en passant, the move cannot be performed by any other piece.