In plumbing, a trap is a U-shaped portion of pipe designed to trap liquid or gas to prevent unwanted flow; most notably sewer gases from entering buildings while allowing waste materials to pass through.
source/image(PrtSc): AMRE Supply
How does a P-trap work? In this episode of Spec. Sense, Vance explains how a P-trap uses water to seal the drain and keep sewer gases from leaking into your home. Watch the video from AMRE Supply for more info:
You’ll also learn why airflow is important and why S-traps are no longer installed in homes. If your drain smells bad, then its possible that the trap seal is gone.
Water is the main factor that allows a p-trap to work. If the p-trap becomes dry, then those smells can start to seep into your building.. Every time the trap is used, new water comes into the P-trap, flushing out any remnants that may be in the trap part of the pipe.