The answer to 'what is drain trap' is a U-shaped pipe that is installed under a sink, tub, or floor drain to prevent sewer gases from entering the home. The drain trap holds a small amount of water that creates a barrier to block unpleasant odors and harmful gases from the sewer system or septic tank from coming back up through the drain.
Drain traps are an essential plumbing component that help maintain indoor air quality and prevent pest infestations. They are required by building codes in most areas and must be properly installed to function effectively.