To understand how a hardware wallet works, it's important to be aware of what a wallet is. In addition, we’ll give a brief explanation of what the blockchain is and where your coins actually are. Fun fact - they’re not actually in your wallet.
What is a wallet?
A wallet is a collection of two keys: the public key and the private key. Each Bitcoin address consists of these two keys. The address you send to people, for example, to perform a Bitcoin transaction is the public section of the key. A transaction to your public key, such as a Bitcoin address, only gives access to the cryptographic currency in conjunction with the private key. These transactions are stored in the blockchain.
What is the blockchain and where do my coins go?
The blockchain is a constantly growing database of transaction information. This information is sent to all nodes in the network. If you make a valid transaction, it will be saved in the next block. During a transaction, all previous transactions will be scanned and a balance will be made of your total total transactions.
It’s important to know that your coins are not technically stored on the blockchain. The coins themselves are not really something specific that requires storage. The amount of coins you have consists purely of the history and the calculated balance sheet total of your transactions. Suppose you buy 5 Bitcoin, the blockchain records this transaction, and your key gains access to use the 5 BTC. As you have control over the private key for the address, you now have 5 BTC you can use.
With many coins like Bitcoin, Ether / Ethereum and other altcoins, the transactions can only be read on the blockchain. Other coins like Monero are private.
The difference between a wallet and a hardware wallet
Unlike a normal wallet, a hardware wallet provides complete insulation between your private key and computer or phone. Due to this isolation, a hardware wallet is not sensitive to hacks, viruses and spyware. A wallet like Ledger Nano S , Ledger Blue or KeepKey also offers additional protection against physical attacks. So in the event somebody gets your hardware wallet in hand, your private key can not be read because it is stored on a special chip, called a "secure element." More reasons for purchasing a hardware wallet can be found in our article "Why use a hardware wallet?" .
Most hardware wallets make sure that you also make a backup of your private key. If your hardware wallet dies, or is lost, you will still have access to your currency through the backup paper (where your private key is on). This allows you to restore the wallet.
So it's important to understand that your coins are not really on the wallet itself. The hardware wallet only contains your private key that is linked to your transaction history, which is stored on the blockchain. However, as the private key grants access to your coins, it is wise to safeguard it as much as possible.