An overflow drain is just what it sounds like. It is a special drain to stop something from overflowing. Overflow drains are used in aquariums, manufacturing facilities and many other situations where a constant level of a liquid is required. In a bathtub, the overflow is designed to stop water from spilling out if someone accidentally leaves the faucet on or overfills the tub before getting in.
The bathtub drain is divided into two parts--the main drain and the overflow. The main drain is at the bottom of the tub and the overflow is a few inches below the rim. Both drains are connected to tubes which meet beneath the bathtub and merge into a single pipe. The main drain may have a plug stopper or a mechanical stopper operated by a lever, but the overflow never has a stopper.
If the main drain is stoppered while the water is left on, water will keep building up in the tub until it reaches the overflow. Because the overflow does not have a stopper, the water will start to drain from it while it is still several inches below the rim of the tub. Assuming that the pipes are not clogged and can drain faster than the faucet provides water, the overflow will keep the water level a few inches below the tub's rim, preventing the water from pouring onto the floor.