Traps are vital components of the drainage system. You can find a trap under every sink. It is the curved section of pipe under a drain. Water flows from the basin with enough force to go through the trap and out through the drainpipe, but enough water remains in the trap afterward to form a seal that prevents sewer gas from backing up into your kitchen or bathroom. Every fixture must have a trap.
Toilets are self-trapped and don't require an additional trap at the drain. Bathtubs ofter have drum traps, not only to form a seal against sewer gas but also to collect hair and dirt in order to prevent clogged drains. Some kitchen sinks have grease traps to collect grease that might otherwise cause clogging. Because grease and hair are generally the main causes of drain clogs, traps often have clean-out plugs that give you easier access to remove or break up any blockage.
Since a drainage system involves all of these components, it is usually referred to as the DWV: the drain-waste-vent system. If water is to flow out openly and waste is to exit properly, all components of the DWV must be present and in good working order. Examine the pipes in your basement or crawl space under your house to help you understand the drain system better.