A hardware security module (HSM) is a physical computing device that is specifically designed to store secret keys, and it provides various crypto processing functionalities.
One of the key features of HSM is tamper protection. This means that if anyone tries to physically tamper the device (tries to open it), then HSM will automatically delete the key.
Since HSM plays a critical role in mission-critical applications, they are generally certified against international standard certification such as FIPS 140.