If you are in a position where castling is allowed (you haven't moved your king or rook yet, you aren't currently in check, your king won't move through the path of check) the you just move your king over two spaces and the rook will move automatically.