move the king to its destination square. If it wont go, then its illegal to castle.
how do i castle

There are a few rules to castleing:
1. Your king and the rook, to the side you are castleing to, must be on their home squares.
2. Your king cannot be in check.
3. Your king can't move through check during the castling move.
4. Your king can't be in check when you have finished the move.
5. There cannot be any pieces between the king and the rook.
6.When you castle, YOU MUST MOVE THE KING FIRST. If you attempt to move the rook first, the rules think you are just making a rook move and you can not castle.
7. If you have met all of the rules above you can castle. The king moves two squares to the side you want to castle to, then place the rook, next to the king, on the square towards the middle of the board.
ie. King side castle: The King on e1 moves to c1 and the rook on a1 moves to d1.
Queen side castle: The King on e1 moves to g1 and the rook on h1 moves to f1.
It is a little confusing, but I hope this helps.

And it's always good to read www.chess.com/learn-how-to-play-chess.html because you're a beginner. Don't get surprised by some "unusual" moves.
just started playing and i cant gigure out how to castle in live play.