En-Passant is a special rule only for pawns.
One pawn --> on starting Rank --> for its first move, it moves 2 squares
Opponent pawn --> 2 Ranks away & on the next File --> can capture
The only condition is that it must be captured when you have the chance to do so. You cannot capture En-Passant after playing some other move in-between.
En-Passant on Wiki