Move the King two squares on the side you want to castle. The rook should automatically go to the other side of the King.
Question

Try to move the king two squares towards the rook and if castling is a legal move the site will move the rook automatically for you. You always castle by moving the king.
You can practice in this puzzle. Try to castle queenside (it wont let you castle kingside because that's not the solution ;)

This is 100% insurance against "mouse slips."
A couple of years ago I was playing (here) in a tournament and I accidentally clicked on "submit move" instead of "analyze" against a stronger (+200pts) player where we were in a fairly even position. It was a really bad move, and since the opponent was online, I thought he would take advantage quickly and then I would resign. Well, my crazy move must have made him really think I knew what I was doing, because his play really slowed down after that!
Can someone please tell me how to do the king and castle move I've lost a few matches because I'm unsure on how to do it any advice would be greatly appreciated!