A booby trap is something which is designed to deploy when an unsuspecting victim interacts with it. Booby traps can be harmless practical jokes, or they can be more serious. The key to a booby trap is that it usually requires some sort of mechanical sequence, and the person who activates it is unaware of what he or she has done until the booby trap has been set off.
People have been referring to idiots as “boobies” since the 17th century, and by the 19th century, the sense of “booby trap” as in a practical joke had emerged. The meaning of the term shifted slightly in the 20th century, when military campaigns began to utilize lethal booby traps. Today, the term is used in both senses.
Often, a booby trap is activated by a routine or harmless activity, like walking on a trail, opening a door, or sitting in a chair. In some cases, the trap may involve a lure which draws someone to the area. The action starts a sequence of events which ends in the deployment of the booby trap. In a simple example of a practical joke booby trap, a pail of water could be positioned over a door and attached to a string linked to the handle, so that when someone opens the door, the pail inverts, pouring water all over the victim. In a more sinister example of the booby trap, soldiers could plant pressure-sensitive mines across a trail, so that when people stepped on the pressure plates, the mines would go off.
As a practical joke, the booby trap is a time-honored tradition, and some jokers enjoy devising fiendishly complex booby traps. April Fool's Day is a prime time for booby trapping in a variety of creative ways, and people may also use practical jokes to prank people who are moving into new homes and engaging in other major activities, like getting married or buying a new car. Most booby traps are designed to be totally harmless, albeit humiliating for the victim, although a booby trap can sometimes go wrong.
The military booby trap is most definitely designed to be harmful. The goal is usually to incapacitate or demoralize the enemy, and to provide an alert that enemy soldiers are approaching. Booby traps are often positioned in an area of heavily contested territory, both to keep people out and to provide an alert for guards in the event that someone tries to enter that area. Mines are a common example of booby traps used in armed conflicts, as are improvised explosive devices (IEDs).