A hardware wallet is an encrypted device which can be used as a bitcoin wallet. The hardware wallet is a form of cold storage. This means that the private key is stored offline.
The public key is the bit-/altcoin address which is used to make cryptocurrency transactions. The public key is generated by the private key. It is important to save the private key in a secure location and not to share it with anyone to protect the bit-/altcoins. A hardware wallet is a secured way to do this.
It is still possible to do online transactions from cold storage with a hardware wallet, this can be done by plugging the hardware wallet into a computer and by giving permission then entering the password.
There are different kinds of hardware wallets which all vary in price and safety level. Most of the general settings for hardware wallets are the same; a pin and password will have to be configured.
To prevent losing your bit-/altcoins in cases of loss or damage of the hardware wallet there is a safety procedure which can be followed. By making a note of the wallet seeds and storing them in a safe way it is possible to retrieve the wallet.
The wallet seeds can be perceived as safety words that are included with the hardware wallet. When the hardware wallet is lost it’s still possible to get access to your login information/private key by supplying these safety words. This makes it possible to regain access to the account with your public key that contains the bit-/altcoins.