A relief valve is a device used to limit pressure in one or more locations in a hydraulic circuit. A relief valve uses a spool or poppet engaged to the closed position by a spring. A spool is a cylindrical piece of machined steel that slides within a machined body. A poppet is a flat piece of machined steel attached to a stem, and the face of the poppet rests against a seat to provide superior sealing. A spool often provides better metering characteristics, but has significantly more leakage than a poppet design.

When pressure rises in the portion of the circuit where the relief valve is installed, force acts upon the spool end or poppet face; the force applied by the spring opposes the force on the spool end or poppet face to keep the valve closed. Valve spring compression force is often variable — compression height can be reduced by an adjustable screw — although effective range is limited (for example, a spring might be effective between 1,000 and 5,000 psi or 100 and 1,200 psi, but rarely between 100 and 5,000 psi).
As hydraulic pressure continues to rise in the circuit where the valve is installed, force against the spool or poppet starts to overcome the opposing force of the spring, opening a flow path to the tank. As pressurized fluid exits the relief valve, energy is diverted (in the form of heat) until downstream pressure equals the spring value force, which could be drops of flow or all of pump flow, depending on the application and state of the circuit.
In short, a relief valve is a hydraulic component designed to limit pressure in an entire system or subcircuit by diverting pressurized flow to the reservoir. They are most often installed directly downstream of the pump to control system pressure, but can be used in other parts of the circuit to protect isolated components.