It holds a water seal
The P-trap is the curved section of drain pipe under a sink, shaped like a P lying on its side. After water drains, a few inches stay in the bottom of the curve. That standing water blocks sewer gas in the drain line from coming up into the room. Every fixture has one, including tubs, showers, and floor drains. Toilets have a trap built into the bowl.
It catches things before they go further
Because of the curve, heavy things settle in the trap: rings, earring backs, and a lot of hair and grease. That is why the trap is the first place to look for a clog under a sink, and why it can be taken apart by hand. See how to pull a P-trap.
How a trap stops working
- Evaporation: An unused drain dries out in a few weeks. Running water refills it.
- Siphoning: If the drain is not vented properly, water rushing down can pull the trap empty. You often hear a gurgle when it happens.
- Leaks: Loose slip nuts or a cracked trap let water and the seal drain away, usually with a wet cabinet floor as the clue.
Why the shape matters
Older homes sometimes have an S-trap, where the pipe curves down into the floor instead of turning into the wall. S-traps are prone to siphoning themselves dry and are not allowed for new work under current plumbing code. If you have one and notice sewer smells, that is a likely reason.
The vent is the trap's partner
Every trap needs a vent nearby to let air into the drain so water does not pull the seal out behind it. A trap without a working vent is a trap that will not hold. That is why sewer smells often trace back to venting, not the trap itself.