A trap is something you can’t get out of. If a critter is nibbling at your cherry tomato plants, set a trap to catch the thief. (But if it turns out to be your little brother, set him free!)
If a TV character yells, "Look out! It's a trap!" they're dramatically warning someone about an imminent surprise attack or mean-spirited trick. Other kinds of traps include a plumbing trap, a curved pipe that traps liquid in it so that gases can't rise up into your sink, and a sand trap, the tricky hollow where your ball gets stuck on a golf course. The Germanic root word of trap literally means "that onto which one steps."