Traps vary in definition. They can refer to a mere damaging floor that the player must navigate, or they can be more intricate. Many Doom levels have booby-traps for example, that release a squad of monsters on the unsuspecting player when they throw an innocent-looking switch. Some traps are baited with a big gun or powerup, and are activated when the player walks up to the item to grab it. Almost any kind of trap is considered fair to a degree as long as it is beatable, and can add a much needed element of surprise to an otherwise mundane level.
The first trivial example of a trap appears on E1M1: Hangar, where the player must navigate over a zigzag bridge over a pool of nukage.
A monster closet is a type of trap in which monsters are staged in a hidden room, in which the player activates a switch or steps over a linedef, opening a door disguised as a wall with the monsters behind, catching the player by surprise. The first example of a monster closet appears on Doom E1M3: Toxin Refinery. When the player obtains the blue keycard, the lights shut off and a closet opens up, awakening the imps inside.
A teleport ambush is a type of trap in which monsters are stationed in a hidden room accompanied by a teleport that they will be able to walk on. The room is isolated on its own and the monsters are awakened prematurely by the sound of gunfire. When the player activates a switch or steps over a linedef, the monsters are released within the isolated room, and are able to step over the teleporter, summoning themselves at the teleport destinations assigned by the level designer. The first example of a teleport ambush appears on the secret level, Doom E1M9: Military Base, where the player steps on a red star to reach a rocket launcher and activating a series of monsters to appear in front of him, simulating the player disturbing a highly unstable demonic shrine.