Chess has two types of castling: kingside and queenside.
Which one is more advantageous near the beginning of the game?
Neither method of castling is superior to the other. They are completely position-dependent. Neither method is advantageous at the beginning of the game relative to each other.
One of the major factors in Chess is position, so you have to choose where to castle based on the opening you're using.
There are two purposes for castling:
- Protect the King
- Develop the Rook
- Castling queenside will put your rook on a center file.
- Castling queenside will leave your King open to a diagonal threat.
- Castling kingside will have tend to have your King protected even from the diagonal
- Castling kingside will usually mean that you have to move your Rook again.
- Castling kingside can generally be done sooner since there are less pieces to move out of the way.
Of course, you can see, it all depends on your opening. If you're moving a lot of queenside pieces then it may do you well to castle queenside, but it depends on your pawn structure. If you're doing a King's pawn opening, then you'll probably end up castling kingside.
In the "old" days, people preferred kingside castling. It was faster (only two pieces in the way instead of three). It also meant that you could use your pawns on the "long" (queen) side for maneuvering, without worrying about leaving your king unprotected. One obvious advantage of kingside castling was that it protected the rook pawn, castling on the other side, you need an extra move to do this. In an era when openings were "short" (about ten moves), this was an advantage.
Currently, people are beginning to pay more attention to queen side castling. That's partly because the methods of attacking on the kingside have mostly been worked out, but they are less familiar on the queenside. Another reason is that the rook lands on a center (queen) file instead of a bishop file, which could be more useful for in controlling the center.
Nowadays, the tendency is for longer openings. If you don't mind taking an extra move to move out the queen (and maybe a second extra move to allow the king to protect the rook pawn), the advantages mentioned in the last paragraph could argue in favor of queenside castling.
One thing that has not been mentioned is opposite side castling. (can happen in some variation of the Sicilian)
Players can then storm the opponent's castle with pawns which results in a wide scale fight.