Check and checkmate in chess
Check means the king is under attack. Checkmate means the king is under attack and no legal move gets it out. You have to answer a check on your very next move. Checkmate ends the game at once, and the player who delivers it wins.
What is check in chess?
A king is in check when an enemy piece attacks the square it stands on. Any piece can give check, a pawn included. The only exception is the king: two kings may never stand on neighbouring squares, so a king can't check another king.
The player in check must get out of it on the next move. You can't ignore a check, and you can't make a move that puts or leaves your own king in check. Such moves are illegal, and online the board simply won't accept them.
How to get out of check: three ways
There are exactly three ways, and it pays to look for them every time. Move the king to a square that isn't attacked. Capture the piece giving check. Or block the check by putting one of your pieces between the attacker and your king.
Blocking doesn't work against a knight, which jumps, or against a pawn or piece standing right next to the king. The king can capture the checking piece itself only if that piece isn't protected.
What is checkmate?
Checkmate is a check with no way out: the king has no safe square, the checking piece can't be captured, and nothing can be placed in the way. The game ends on the spot, and the king is never actually taken.
A back-rank mate often happens after castling. The king’s own pawns block its escape when an enemy rook or queen gives check along the back rank. A pawn move such as h3 can give the king an escape square, provided the opponent does not control it.
Scholar's mate and how to stop it
After 1. e4 e5 2. Bc4 Nc6 3. Qh5 Nf6?? 4. Qxf7#, the queen gives mate. The bishop on c4 protects the queen on f7, so the king cannot capture her.
The defence is easy once you've seen it. After 3.Qh5, the move 3...g6 blocks the queen's diagonal and attacks her, and 3...Qe7 or 3...Qf6 protects f7. More mating patterns are collected in basic checkmates, and the tricks that lead to them in chess tactics.
Discovered check and double check
A discovered check happens when a piece moves away and opens a line for a rook, bishop or queen standing behind it. The piece that moved is free to attack something else at the same time, and since the opponent has to deal with the check first, that other target often falls.
In a double check two pieces give check at once. Blocking or capturing can deal with only one of them, so the king has to move. If it has nowhere to go, it's mate.
Checkmate vs stalemate
Stalemate looks similar but means the opposite: the side to move is not in check and has no legal move. The game ends in a draw.
This is the classic way to throw away a won ending. You have a queen, the lone king has run out of moves, but nothing attacks it. When your opponent has only a king left, make sure it always has a square to go to until you can give mate. The full list of draws is in stalemate and draws.
Do you have to say “check”?
No. FIDE rules don't require announcing check. People often say it in friendly games, but spotting a check is your opponent's job, and in a tournament nobody is obliged to warn you.
The online board accepts only legal moves. To practise spotting checks, play the opening moves of a recent game on the analysis board. Stop at a position and look for every check the side to move can give. Then play the computer on level 1 and look for checks before every move.
Questions
What is the difference between check and checkmate?
In check the king is attacked, but there is a legal way out. In checkmate there is none, and the game is over.
Can a king put another king in check?
No. The two kings may never stand on neighbouring squares, so one can't attack the other. A king can still help the other pieces mate by covering escape squares.
Can a pawn checkmate a king?
Yes. A pawn gives check diagonally forward, the same way it captures, and that check is mate if the king has no way out.
Can you castle out of check?
No. Castling is not allowed while your king is in check. Deal with the check first. You can castle later as long as the king hasn't moved.
What happens if you make an illegal move in chess?
Online you can't: the board accepts only legal moves. Over the board an illegal move is corrected and penalised, and repeated illegal moves can lose the game.