Each fixture has to be trapped prior to it's drain. The vents are in the drain lines after the trap. Think of the traps you are aware of. A sink's trap is directly under the sink and goes into the wall where it connects with the drain. The vent is connected to the drain inside the wall. A toilet's drain is part of the structure of the toilet, but it works the same way.