The king can only move more than one square during a castling move. To castle, the king moves two square towards the rook, and rook moves to the other side of the king. This is all one move.
You may only castle when :
A King-side castling move may be made if neither the king nor the king-side rook has yet moved in the game and both squares between the king and the king-side rook are unoccupied.
A Queen-side castling move may be made if neither the king nor the queen-side rook has yet moved in the game and all three squares between the king and the queen-side rook are unoccupied.