Chess is played by two players on an 8×8 board. Each side starts with 16 pieces: one king, one queen, two rooks, two bishops, two knights and eight pawns. White moves first. The goal is to checkmate the opponent's king — attack it so it cannot escape.
How the pieces move
King: one square in any direction.
Queen: any number of squares in any straight or diagonal line.
Rook: any number of squares along ranks and files.
Bishop: any number of squares diagonally.
Knight: in an L-shape — two squares one way, then one square at a right angle; it can jump over pieces.
Pawn: one square forward (two on its first move) and captures one square diagonally forward.
Special moves
Castling: the king moves two squares towards a rook, and the rook jumps to the other side of the king — allowed only if neither has moved, the squares between are empty and the king is not in, passing through or landing in check.
En passant: a pawn that advances two squares and lands beside an enemy pawn can be captured as if it had moved one square, on the very next move only.
Promotion: a pawn reaching the last rank becomes a queen, rook, bishop or knight.
How the game ends
Checkmate wins the game. Stalemate — the player to move has no legal move and is not in check — is a draw, as are threefold repetition, the 50-move rule, insufficient material and agreement.