Sometimes people will use these terms like they mean the same thing, but each performs a different but important function.
Safety valves are a type of control mechanism. It is meant to release pressure when it reaches a specified threshold. The safety valve then resets the pressure back to its original level. This is like the valve you'll find on a pressure cooker. In more industrial settings, you'll find them on the safety setting of autoclaves. Contents are kept at or under a specifi
ed pressure, and an alarm goes off when this pressure is exceeded. Then, the pressure is released, preventing explosions or accidents.
Relief valves, on the other hand, are a subset of safety valves that are designed to immediately relieve pressure. It is triggered by dangerous circumstances, such as an abrupt excess of pressure or a level of pressure that threatens to result in system failure. Relief valves are found on fire engines to prevent fire hoses from rupturing from excess pressure.