What is the difference between stalemate and checkmate in chess?
Checkmate wins the game. Stalemate draws it. The difference between them is a single condition, and it is the source of more frustration than any other rule in chess.
Checkmate occurs when a player's king is in check — under immediate attack — and there is no legal move that removes the attack. No capture of the attacking piece, no blocking, no escape square. The game ends immediately and the attacking player wins.
Stalemate occurs when a player is not in check but has no legal move at all. Every piece is either blocked or pinned, and every square the king could move to is attacked. The rules require a move; none exists. The game is a draw.
Why this matters enormously. A player with an overwhelming material advantage — a queen and rook against a lone king — can throw away a certain win by stalemating the opponent. The defending side in a lost position actively plays for it, and stalemate tricks are a whole area of endgame technique.
How to avoid causing it when winning: leave the opposing king a square, check with purpose rather than randomly, and be especially careful when the enemy king is confined to a corner with no other pieces. A useful habit is to ask before each move whether the opponent will have a legal reply.
Other draws in chess, which people often confuse with stalemate:
Threefold repetition — the same position occurs three times.
The fifty-move rule — fifty moves by each side with no capture and no pawn move.
Insufficient material — neither side has enough to force mate, such as king and bishop against king.
Agreement — both players simply agree.
Historically the rule varied. In some earlier traditions stalemate was a win, or a loss for the stalemated player. The modern draw was standardised in the nineteenth century, and it remains debated.