A backflow preventer is installed in the pipe. In a pipe, the flow of liquid creates pressure. During normal flow, the pressure on the inlet of the backflow preventer is higher than the pressure on the outlet. Because the flow is normal, the valve is open. When a backflow happens, the pressure on the outlet becomes greater than the pressure on the inlet. The valve senses the backwards condition and closes, stopping the flow.
Backflow preventers range in design from ultra-simple to complex computer-controlled valves. In a simple design, its nothing more than a ball inside a cage. Think of a small rubber ball inside a funnel. A hose is attached to the nozzle of the funnel. If you force water through the hose, the water will lift the ball slightly, and flow past the ball. This is normal flow. Now try to fill the funnel with water. The ball blocks the opening, preventing water flow. This is backwards flow, stopped by the ball blocking the opening.
A backflow preventer is a safety device. It's installed in situations where a backflow of contaminated liquid could result in contamination of the entire liquid in the pipe. The FEBCO Company points out seven case histories of people becoming seriously ill or even dying because they inadvertently drank contaminated water. The clean water supplies became contaminated because the water pressure reversed, and the piping system "sucked up" contaminated water. This is called back-siphoning. A backflow preventer stops back-siphoning.
A special type of pressure backflow preventer is used on pipes carrying flammable gas. These are called anti-flashback valves or flame arrestors. Its sole purpose is to prevent the flame front of a burning gas from traveling back into a piping system. Think of it this way: An underground natural gas pipe ends in a house. There's a fire in the house and the natural gas inside the pipe catches fire. The fire can spread through the entire system, causing a huge explosion at the main distribution point. All natural gas lines have anti-flashback valves installed inside the home regulators, so this doesn't happen.