There is a rook on b5, directly beside the black pawn that has just landed on c5, and the rook can do precisely nothing about it. The pawn on d5 can.
g Same rank, same distance, same pawn, two completely different rights. The rook can move to c6 if it likes, and it will land on an empty square and capture nothing at all, because c6 is only a capture square for a pawn taking in passing.
Pawn takes pawn, and that is the whole sentence
En passant lives in Article 3.7 of the FIDE Laws, the article that describes how the pawn moves. Nothing in it mentions any other piece. So:
A rook, bishop, knight, queen or king standing beside the arriving pawn has no en passant capture. It has whatever ordinary moves it has and nothing extra.
A piece can never be captured en passant. If your opponent slides a rook two squares past your pawn, that is a rook move, and rooks are allowed to walk past pawns.
The capturing pawn has to be yours and has to be on its fifth rank, which is rank 5 for White and rank 4 for Black. A pawn on the sixth rank looking at the same event gets nothing.
Why people think a rook can do it
Two places, going by the questions I get.
The first is the word capture. People read en passant as a special kind of capture, and then reason that any piece which can capture might be able to do this one. It is better understood the other way round: it is a special kind of pawn move, and capturing is what pawns do diagonally anyway. The pawn is not doing something new, it is doing its normal diagonal capture one move late.
The second is that the skipped square looks unusual. On d6 there is no piece, yet a pawn moving there takes something. That feels like a property of the square rather than of the pawn, and if it were a property of the square then anything landing on it should collect the prize. It is not. It is a one-move right that belongs to one specific pawn, recorded as a single field in the FEN and cleared on the next half-move.
For the four conditions in order, see the en passant rules; to drill the pattern until your eye finds it without being asked, the en passant puzzles are the fastest way there.