(note: this answer is based on UK practices, the general principles are likely to apply everywhere but details of how the problems are mitigated may vary between jurisdictions).
Various nasty gasses can come off the contents of waste pipes and we don't want those gasses to be allowed into the house.
To block the sewer gasses from entering the house we have "traps" (the most common style being a U bend but there are other varieties). These are designed to remain full of water and hence provide a gas barrier between the room and the drainage system.
But traps only work for small pressure differentials. If the pressure in the waste system is too high (for example because of rotting waste producing gas) then gas from the waste system can bubble out through the traps. If the pressure in the waste system is too low (for example because of siphon affects) then it can suck the water out of the trap.
One common soloution to this is to have a vertical pipe (the "stack") running above roof level where it is vented. This provides a path for any pressure builup in the system to excape and as long as the fixtures are close to the stack and connected to it by gently sloping pipes this one vent at the top is enough to reduce siphon affects to an accepable level.
If the fixtures are a long way from the stack there may be a need for specific vent pipes returning from the fixtures to the stack (alternatively there may just be more than one stack so that there aren't any fixtures a long distance from their stack).
There are other soloutions too. Sinks, baths etc (but not toilets) in older houses in the UK often have an open pipe draining into a drain (for downstairs stuff) or hopper (for upstairs stuff) outside.
More modern systems may use air admittance valves which let air in but not out. Since they don't let air out they can be installed indoors. Such valves will let air in to break a siphon but they won't let pressure out. So they will reduce but not eliminate the need for "open" ventilation.