1.e4 d5 2.exd5, and a pawn has come off the board. The x in the middle is the whole announcement: something was captured on d5.
8
7
2
a
b
c
d
e
f
g
h 1 The mark sits between the piece and the arrival square, so Nxf3 is “knight takes on f3” and Qxd8+ is “queen takes on d8 with check”. What you never write is where the capturing piece came from, or the name of the thing it captured. Notation records the square, not the victim. Rxe5 is the same four characters whether the rook has eaten a pawn or a queen, and you find out which by looking at the board.
Pawns bring their file with them
A pawn has no letter of its own, so a pawn capture would be nothing but a square, and a square is not enough. When pawns on c4 and e4 can both take on d5, xd5 tells you nothing. The rule is that a pawn capture always names the file the pawn left from (Appendix C.8): exd5, gxf3, axb5.
That makes a pawn capture the only move in algebraic notation where you are always told the departure square as well as the arrival one. There is more on that, including promotions, on writing a pawn move. En passant follows the same shape, exd6, with the arrival square being the one the capturing pawn finishes on rather than the square of the pawn it removed.
The x you are allowed to leave out
Strictly, the x is optional. The laws say it “may be inserted” (C.8), and old newspaper columns, where every character cost money to set, printed things like ed and left the reader to work it out. Nobody writes that way now and neither should you: your scoresheet is read by an arbiter, not a typesetter.
Old books do something else that catches people out. German, Russian and other continental publishers used a colon: N:f3, or sometimes Nf3: with the colon trailing. Pick up a second-hand book full of colons and you are reading captures, not stipulations. That habit belongs with descriptive notation, the other convention waiting for you in old print, where a capture named the piece taken (QxBP) rather than the square it stood on.
One last thing, and it is not about notation. The x records that a capture happened, not that it was a good idea. The commonest way to lose material at club level is taking a pawn that was bait, so count the defenders before you reach for the pen: the pieces worth taking are the ones nobody is looking after.