Backflow prevention devices operate by allowing water to flow in only one direction. In an unprotected water service connection, potable water can flow both in and out of a building or fixture. When water service is interrupted in the street or in a building for any reason, there is a pressure drop which can draw contaminated water backwards into the water system. For example, cleaning fluids may be drawn back from car washes; stagnant water from fire sprinkler systems may enter the drinking waterline; bacteria and pathogens of all sorts can be siphoned back into the water system from air conditioning cooling towers; and chemicals from medical clinic's X-ray development may flow backwards into the potable water system. To protect water quality, backflow protection is required where the end user poses a risk of polluting the city's water supply.
Types of Devices
Air Gap: An air gap is a vertical, physical separation between the end of a water supply outlet and the flood-level rim of a receiving vessel.

Reduced Pressure Backflow Prevention Assembly (RP): An RP is a mechanical backflow preventer that consists of two independently acting, spring-loaded check valves with a hydraulically operating, mechanically independent, spring-loaded pressure differential relief valve between the check valves and below the first check valve.

Double Check Valve Assembly (DC): A DC is a mechanical backflow preventer that consists of two independently acting, spring-loaded check valves.

Pressure Vacuum Breaker Assembly (PVB): A PVB is a mechanical backflow preventer that consists of an independently acting, spring-loaded check valve and an independently acting, spring-loaded, air inlet valve on the discharge side of the check valve.

Pictures provided by the American Backflow Prevention Association.