Castling is a strong move to be employed near the end of the opening. It is the only move in chess which allows a player to move two pieces at the same time. The immediate advantages of castling are gaining protection for the king, and gaining development of the rook. If the preconditions are met, castling is executed by moving the king two squares towards the rook, and then placing the rook on the square immediately adjacent to the king and nearer the center of the board than its starting position. In algebraic notation, castling kingside is denoted as O-O and castling queenside is denoted as O-O-O. An easy way to remember which is which is to note the number of squares the Rook moves in order to castle properly. Kingside - the Rook will move two squares. Queenside - the Rook will move three squares.

Preconditions to castle
Both the King and intended Rook are in the same rank1
Both the King and intended Rook must not have been moved from their starting position
There are no pieces between the King and the Rook
The King is not currently in check
The opponent does not control any squares the King would pass through
The opponent does not control the square the King would end on
Misperceptions
The Rook may be under attack and still castle, providing all aforementioned preconditions are met
When castling queenside, the Rook may pass through a square the opponent controls (so long as the King does not)
A prior check against the King, if resolved by any means other than moving the King, does not prevent future castling

These preconditions are illustrated up on the annotated board below.

¤               ♟ ♟      ♟ A B C D E F G H 8 ♜ ♚ ♜ 8 7 ♞ ♟ ♟ 7 6 ♞ 6 5 5 4 ♙ 4 3 ♕ ♙ ♙ 3 2 ♙ ♙ ♗ 2 1 ♖ 1 A B C D E F G H

Castling evolved into its current form sometime in the 17th century, most likely in response to the 16th century rule changes granting Bishop and Queen the expanded powers we recognize today. It is more common for both players to castle kingside than for both players to castle queenside2. If one player castles kingside, and the other queenside, it typically indicates a large difference in either skill or aggression. While "opposite side castling" is more rare than O-O / O-O or O-O-O / O-O-O, it does occur more often within the Dragon Variation of the Sicilian Defense by the nature of the system that variation employs.

1For every rule there is a prior violation. Dutch journalist Tim Krabbe once composed a chess problem which involved vertically castling between a King on e1 and a pawn which underpromoted to a Rook on E8. Since the puzzle was published, FIDE introduced the first rule above - both pieces must be in the same rank. Wikipedia. "Castling". Accessed 11/14/2018.

2Citation required. Wikipedia. "Castling". Accessed 11/14/2018.

IronNoder 2018: 11/30