yes, the closest move to what you describe is called "en passant". . .the rules will explain it . . and it is one of the moves that are a little confusing to beginners at first.
This move only occurs on the first move that the pawn can make, and in which the pawn moves two squares, and then passes the other player's pawn to one side or the other. that player, for one move only, has the choice to capture the pawn, just as if it sat on the first square rather than having jumped up two squares.