Usually, you want to castle to protect your King and get your Rook into the game. Sometimes you have a chance to castle Queenside or Kingside. Here is a game where my opponent castled Queenside, but it led directly into mate. He was better off not castling at all or should have tried to castling Kingside.