In accordance with national and state plumbing codes, P-traps have to be placed under just about every plumbing fixture, which includes sinks, bathtubs and toilets. These P-shaped bends trap a small amount of water at their bottoms. It's this water in the bend below each fixture that acts as a barrier to smells, gases, insects and bacteria. That way, they stay out of the interior of the home and away from residents.
As for P-traps, the depth of seal, which is the height of the water remaining in the trap, is important. Required depths run from 2 inches in older piping, which empties in to an open drain up to 3 inches for new plumbing that's enclosed. If your home's fairly new, chances are good that the depth of seal in your traps will be at least 3 inches.
Because P-traps are designed to be low points under a sink or other fixture, they can often become collection points for hair and other objects. Toothbrushes, jewelry, combs and other objects can end up trapped down within them, which can eventually lead to clogging of that particular fixture. Fortunately, most P-traps are designed to be easily disassembled so that they can be cleaned out without having to disconnect the fixture's entire plumbing setup.
If you don't use your sinks or bathtubs for several days, you may begin to notice sewer gas-like odors coming from them. That's because the water at the bottom of their P-traps has evaporated away. When that occurs, it's much easier for gases from your home's main drain pipes to enter. The solution to this problem is to install what are called trap primers. These replenish water in P-trap bottoms on a regular basis.