Pawns are the one exception to "captures like it moves": a pawn moves straight ahead but captures one square diagonally forward, and cannot capture a piece directly in front of it. This is why open diagonals in front of pawns are often contested early in the game.
In algebraic notation, a capture is marked with an "x" between the piece letter (or file letter for pawns) and the destination square — for example, Nxe5 or exd5. Capturing is never mandatory in standard chess (unlike some variants such as draughts); a player may decline an available capture if a different move serves their plan better.
Deciding whether and when to capture is a core skill: recapturing immediately can restore material balance, but sometimes leaving a piece "hanging" for a move (an in-between move, or zwischenzug) creates a bigger threat elsewhere. Counting attackers and defenders on a square before initiating a series of captures is essential to avoid losing material.