En passant is the capture students are sure is illegal: a pawn takes a pawn that has just marched two squares past it, landing on the square that pawn skipped. FIDE Laws 3.7.3.1–3.7.3.2 make it a normal capture with one condition — it has to be the immediate reply.
What the rule allows
When an opposing pawn advances two squares and lands beside yours, you may capture it as though it had advanced only one square. Your pawn moves diagonally to the square the opposing pawn passed over, and the captured pawn comes off the board from its own square.
The window closes after one move
The capture is only available as your immediate reply to the two-square advance. If you make any other move, the opportunity is gone for good — it cannot be saved for later.
Why the window matters later
A position where en passant is still possible is not the same as the same position with the window closed: the possible moves must also match when deciding whether the position repeated. For a draw claim, the window is part of the position.
The full rule page carries the article text, both diagrams and the repetition consequence, and the class sheet keeps the one-line classroom version.