A gas regulator consists of several key components, including the body, inlet and outlet connections, an internal spring, and a diaphragm. The diaphragm is a flexible membrane that moves in response to pressure changes. When high-pressure gas enters the regulator, it acts on the diaphragm, which in turn compresses a spring. This movement adjusts the size of an internal valve that controls the flow of gas to the outlet.