Castling is a single move where the king and a rook move at once: the king steps two squares toward a rook, and that rook hops to the king’s other side.
Castling tucks your king into safety and brings a rook toward the centre in one move — it’s usually the most important thing to do in the opening.
You can castle kingside (O-O, short) or queenside (O-O-O, long). It’s only legal if neither the king nor that rook has moved, the squares between them are empty, and your king is not in check, does not pass through an attacked square, and does not land on one.
A king stuck in the centre is the single most common reason club players lose — castle early unless you have a concrete reason not to.
If your king or the castling rook has already moved, if there are pieces between them, or if your king is in check, would pass through an attacked square, or would land on one.
No. You can’t castle while in check, but you can castle later once the check is dealt with (as long as the king and rook still haven’t moved).
BetterChess is a practice tool — we make no guarantee you'll reach 1800 or any rating. Definitions are standard chess terminology; every diagram position is checked legal with the same engine the board runs.