Castling is lesson 1 of 3 in Castling, promotion and en passant, a basics course suited to players rated around 350 (complete beginners). Castling is the only move where two pieces move at once: the king and a rook. It has 3 interactive exercises: 3 find-the-move puzzles. You play every move on a board and get feedback straight away. The lesson is free.
What this lesson explains
To castle, the king moves two squares towards a rook, and that rook jumps to the square on the king's other side. Castling kingside (short) puts the king on g1; queenside (long) puts it on c1.
You may not castle if the king or that rook has already moved, if there are pieces in between, if your king is in check, or if the king would pass over or land on an attacked square. Here the bishop attacks f1, so White cannot castle kingside.
What you practise
Castle kingside: move your king two squares to the right.
Now castle queenside: the king goes two squares to the left.
Only one way of castling is allowed here. Castle!
Worked examples
Castle kingside: move your king two squares to the right. Castled! The king is tucked away and the rook is ready to play.