1

This question already has an answer here:

How is it possible to move c4 to b3?

...

marked as duplicate by D M, Ywapom, itub, Scounged, SmallChess May 22 '18 at 0:20

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

2

This type of capturing with pawn called capturing en passant.

Here's the rule explained on Wikipedia:

When a pawn advances two squares from its starting position and there is an opponent's pawn on an adjacent file next to its destination square, then the opponent's pawn can capture it en passant (in passing), and move to the square the pawn passed over. This can only be done on the very next move, otherwise the right to do so is forfeit.

Not the answer you're looking for? Browse other questions tagged or ask your own question.