This section is from the book "Applied Science For Metal Workers", by William H. Dooley. Also available from Amazon: Applied Science For Metal Workers.
In large communities where houses are quite close together, the sewerage and waste water is disposed of by being allowed to flow into an outlet pipe, called a drain pipe. The drain pipe flows into a larger one and thence, by the force of gravity, to the sea, river, or to a specially prepared place called a filter bed. To prevent the escape of odors from the drain pipe, each pipe must be equipped with a trap - an S-shaped form - partially filled with water (Fig. 207). The water in the trap acts as a seal and prevents the gas from escaping into the house. The trap connects with a pipe, called a vent pipe, that runs to the roof. The object of a vent pipe is to prevent the water from being forced out.
 
Continue to: