The operation of a gas pressure regulator valve can be understood through its basic components the diaphragm, spring, and two ports (inlet and outlet). When gas enters the regulator, it exerts pressure on the diaphragm. The diaphragm's movement compresses or decompresses the spring, which then adjusts the opening of the valve to either allow more gas through or restrict its flow.