Yes. Here are the rules (including castling) for everyone learning how to play chess: https://www.chess.com/learn-how-to-play-chess
As for knowing where to castle, this is not as easy to always know, but this video of mine might help. It is interactive because I give several examples you can "quiz yourself on."
Castling kingside (short castling) consists of moving the king to g1 and the rook to f1 for White, or moving the king to g8 and the rook to f8 for Black. Castling queenside (long castling) consists of moving the king to c1 and the rook to d1 for White, or moving the king to c8 and the rook to d8 for Black.