Pawns have the most complex rules of movement and capturing.
A pawn moves straight forward one square, if that square is vacant.
If it has not yet moved, a pawn also has the option of moving two squares straight forward, provided both squares are vacant.
Pawns cannot move backwards. Note that since a pawn can only capture diagonally, its movement can be blocked by standing in front of them, like Black is doing in this example.
Pawns are the only pieces that capture differently from how they move. A pawn can capture an enemy piece on either of the two squares diagonally in front of the pawn (but cannot move to those squares if they are vacant). Similar to their movement, pawns cannot capture backwards.