The drain in the floor of a bathtub and the overflow drain connect together behind the tub, usually in the wall, but they can be exposed in some tub styles. The pipe from the overflow drain meets with the pipe from the floor drain at a tee fitting and continues straight down where it enters the bathtub's trap.
The drain plug lever is usually located on a decorative cover that hides the overflow drain opening. The lever raises and lowers a rod that connects to another lever where the overflow drain pipe and the floor drain pipe meet. Raising the drain plug lever pushes the rod down, which pushes the second lever down and raises the plug, opening the drain. Moving the drain plug lever down closes the drain plug.
The water in the trap on a bathtub drain prevents sewer gas from entering the home from the sewer or septic and home plumbing system. A U-shaped section of pipe connects to and hangs below the drain pipe. When water enters the drain, gravity pulls it through the pipe and the trap. But the U-shaped portion of the trap that is below the level of the drain pipe never empties of water, preventing gas from leaking into the home.
Plumbing vent pipes keep drains flowing by allowing air to enter the pipe. A bathtub drain without a vent is a like a straw with a finger held over one end. The water drains very slowly or won't drain at all, held in place by the vacuum that forms between the water in the trap and the water in the pipe. Plumbing codes require a vent pipe within 10 feet of a trap. Vent pipes converge in the attic and exit the roof through a single, large-diameter pipe.
Gravity keeps bathtub drains flowing. The drain pipes that lead from the bathtub to the sewer are not perfectly level. They are angled down at a rate of 1/4 inch per foot of horizontal run -- a pipe drops 1 inch every 4 feet. This allows the waste water to flow easily through the pipe and prevents it from backing up into the bathtub.