This arises when a pawn uses its initial-move option to advance two squares instead of one, and in so doing passes over a square that is attacked by an enemy pawn.
A pawn can move two square up as an initial move. This happens when a pawn does this and help its pass over a square that is attacked by an enemy pawn.