As king safety is so important, it is usually advisable to castle early, particularly for beginners. A castled king is typically safer than one in the middle of the board, and castling will usually avoid the quick checkmates that can be frustrating for beginners.
In the diagram above, both players have castled within the first 5 moves of the game. Both kings are quite safe, and neither player needs to fear a quick checkmate.
It is also worth noting that the positions around the kings -- specifically, the three pawns in front of the castled kings -- have not been disturbed. Moving these pawns in the opening will generally make the king very vulnerable, as it opens lines of attack for the other player's pieces.


