A safety valve is a device attached to a steam boiler that is designed to release steam if the boiler pressure exceeds a pre-determined limit. Without a safety valve, a steam boiler could explode unless operated with great care.
Although safety valves were used as early as the 1600s, they weren't perfected until the mid 1800s when applied to steam boilers and steam locomotives. One of the major influences in pressure relief valves was Henry Ashton who invented the lock up pop safety relief valve for steam locomotives in 1871. From that point on, virtually all steam locomotives had steam safety valves.
In normal steam locomotive operation, one never wanted to have the steam safety pop valve release any steam (unless the valve was being tested). The release of steam was very loud. But, more importantly, the release of pressure meant that the steam locomotive operator was wasting steam. It would be equivalent to shovelling coal out the window. As a result, firement had to know how to maintain a safe boiler pressure in all conditions. The unexpected stop was one of the more difficult conditions under which steam pressure needed to be controlled.