A plumbing trap is a U-shaped pipe that is used to prevent sewer gasses from entering a building. It is typically installed under sinks, showers, and other plumbing fixtures. The trap holds a small amount of water that creates a seal, preventing gasses from passing through.