No, you can only castle on certain moves. In order for castling to be legal, the king and the rook you plan to move must not have moved yet in the game, and there must not be any pieces blocking their path. Additionally, the squares between your king and the rook must not be under attack.