Castling and Check
Castling
This special move allows a player to accomplish two important goals in a single turn: bring the King to safety and bring the Rook out of the corner into active play.
Kingside Castling: The player moves the King two squares toward the kingside (right) and then moves the corresponding Rook from the corner to the square the King just jumped over.
Queenside Castling: The player moves the King two squares toward the queenside (left) and then moves the corresponding Rook from the corner to the square the King just jumped over.
Regardless of the side, the King always moves exactly two squares when castling.
However, to castle legally, several conditions must be met: neither the King nor the chosen Rook can have moved previously in the game; there must be no pieces between them; and the King cannot currently be in check, nor pass through or land on any square attacked by an enemy piece.
Castling:

Forbidden Castling:

Check and Checkmate
Checkmate occurs when a King is placed under an inescapable attack (in check) and has no legal moves to escape capture.
There are only three ways a King can escape a check: move to a safe square, block the attack with another piece, or capture the attacking piece.

If the King cannot escape a checkmate position, the game is over.
Conventionally, the King is never physically captured or removed from the board; the game is simply declared over.

Occasionally, chess games do not end with a winner, but result in a draw.