A booby trap is a device set up to be triggered by an unsuspecting victim. As the word trap implies, they often have some form of bait designed to lure the victim towards it. However, in other cases the device is triggered when the victim performs some type of everyday action e.g. opening a door, picking something up or switching something on. Lethal booby traps are often used in warfare, particularly guerilla warfare, and traps designed to cause injury or pain are also sometimes used by criminals wanting to protect drugs or other illicit property, and by some owners of legal property who wish to protect it from theft. Booby traps which merely cause discomfort or embarrassment are a popular form of practical joke.
There used to be simpler ones as well: Fill a cigarette lighter with C4 and a fuse system then leave it lying on a table somewhere. Lots of guys lost hands/fingers to that little one. Same with magazines - remove the powder in a round, relace it with C4. or, a trip wired a ways inside a bunker tied to a stolen claymore - that was always fun. And my personal favorite - take a snake above a gun port in a bunker. Guys run into the bunker and get bitten by a really pissed off viper of some sort. They were creative, I'll give them that, and incredibly vicious and cruel to their own people.