How does a king move in chess?
In chess, the king moves one square in any direction: forward, backward, sideways or diagonally. It can capture an enemy piece by moving onto its square, but it can never move to a square where it would be in check.
The king is the most important piece. The goal of the game is to checkmate the opponent's king, which means attacking it so that it has no way to escape.
Check and checkmate
When a king is under attack, it is in check. The player must respond immediately by moving the king, blocking the attack or capturing the attacking piece.
If none of these is possible, it is checkmate, and the game ends.
Castling
The king has one special move called castling. The king moves two squares toward one of its rooks, and that rook jumps over to the square on the king's other side.
Castling is allowed only if neither piece has moved before, the squares between them are empty, and the king is not in check, does not pass through an attacked square and does not end up in check.
Stalemate
If a player has no legal moves but their king is not in check, the game ends in a draw by stalemate.
Role in the endgame
In the opening and middle game, the king usually stays safely protected. In the endgame, when fewer pieces remain, it becomes an active and strong piece.
Two kings can never stand on neighboring squares.