Kingside castling is a special move in which the king shifts two squares toward the kingside and the nearest rook moves to the other side of the king, all in a single action. It is one of the two forms of castling in chess, alongside queenside castling.
Concretely, the king moves from e1 to g1 (for White) or from e8 to g8 (for Black), while the rook moves from h1 to f1 (for White) or from h8 to f8 (for Black). This move is only legal if neither the king nor that rook has previously moved, if all squares between them (f1 and g1, or f8 and g8) are empty, and if the king is not currently in check and does not pass through or land on a square controlled by the opponent.
In practice, completing kingside castling as early as possible is one of the key priorities of the opening phase. It tucks the king safely behind its own pawns and activates the h-rook, which was previously stuck in the corner. It is typically one of the first strategic goals to reach before launching tactical or positional operations.
