It is most common in first-person shooters when a player finds and hides in a location that gives them a clear advantage over other players. The position is normally hidden from casual view and is used to ambush or carry out sniper attacks on other players. In fast-paced games like Quake or Unreal Tournament, this is often regarded as an annoying and unsporting practice. In more tactical team-based games (for example, Counter-Strike) this might not apply, because ambushing is often a necessary part of the game.
In massively multiplayer online role-playing games and MUDs, camping means something slightly different: it describes staying in a location near where monsters enter the game world. In some games, these positions are easy to spot and once a player or group of players is capable of establishing their camp, they can gain more rewards with less risk to their player character. Similarly, camping spawn locations can occur in some first-person shooters, where it its regarded as especially reprehensible, and is typically called spawn camping.