Start reading this
castleing
When playing on Chess.com you should move your King two squares to the side you intend to castle on and if it is a legal move then the corresponding Rook will come to the appropriate square and the castling move will be made.
This will just confuse you but maybe you need a laugh.
http://www.chess.com/forum/view/general/why-cant-i-castle-arggggg
how do i castle