A pressure regulator is a valve that automatically cuts off the flow of a liquid or gas at a certain pressure, usually for the purpose of preventing damage to plumbing.
Pressure regulators are often used at the main entrance of water to a building. They are also used at the water inlet of recreational vehicles. They allow sources of water to be used which come at a higher pressure than can be tolerated.
Pressure regulators don't simply stop flow when the source pressure is too high. Rather, they react to the pressure on their output side, and close when the pressure in the plumbing reaches the designated level. Should the pressure come down (for example, if someone were to open a faucet), the valve then opens and allows flow until the plumbing pressure goes back up (such as when the faucet is closed).
For recreational vehicles with plumbing, a pressure regulator is a necessity. When camping, a source of water may have an enormous pressure level, particularly if it comes from a tank that is at a much higher elevation than the campground. (Water pressure is highly dependent on how far the water must fall). Without a pressure regulator, the intense pressure encountered at some campgrounds in mountainous areas may be enough to burst the camper's water pipes or unseat the plumbing joints, causing flooding. Pressure regulators for this purpose are typically sold as small screw-on accessories that fit inline with the hoses used to connect an RV to the water supply, which are almost always screw-thread-compatible with the common garden hose.
Another common application of a pressure regulator is on a tank of oxygen used for breathing. An oxygen tank may contain pressures well in excess of 2000 PSI, which is sufficient pressure to violently burst the lungs and chest of a person breathing it. Such a pressure regulator allows only a sustained flow of oxygen similar to standard atmospheric pressure.
A typical pressure regulator uses the outside air as a reference to the baseline pressure. They regulate not on the pressure difference between the inlet and outlet, but rather the pressure difference between the outlet and the outside air.