The p-trap pipe is a p-shaped (or arch shaped) piece that attaches to the lines under the toilet. The main purpose of this piece is to prevent sewer gas from rising out of the toilet system and into the home. Inhaling these sewer fumes frequently can cause headaches, nausea, fatigue, and other serious complications, and can even be fatal if inhaled too frequently. These pipes are commonly made of PVC or stainless steel.
In addition to keeping gasses out, these parts also serve other functions as well. This part also traps up dirt and debris. If you notice the toilet is draining out slowly, the p-trap may be clogged. In order to trap and non-waste materials, the p-trap has a small metal filter that captures the waste to avoid it clogging up plumbing. Once it has filled and no longer allows things to pass, the drain must be cleared out (usually with a simple toilet plunger). For more complicated clogs, the p-trap may have to be removed and replaced. Interestingly enough, the p-trap’s filter has also been known to save valuable items from going into sewer lines, like the jewelry, cellphone, or other valuable items you may have accidentally dropped into your toilet.