The main feature of a trap, such as the U-bend (invented by Thomas Crapper in 1880), is that it holds standing water. This prevents sewer gases in the drains coming back into the building, but still allows waste to pass through into the sewer system.
After a toilet, sink or bath has been used, the ‘trap’ (a P-, S- or U-bend) retains a small amount of water to create the seal. All plumbing fixtures must be equipped with either an internal or external trap.
Traps also stop objects accidentally dropped, such as jewellery, and collect hair and other debris. Most can either be dismantled for cleaning, or have a cleaning access point.