Bitcoin mining is the process of recording transactions on the Bitcoin network. To do this, miners compete against each other to solve a difficult puzzle that resets every 10 minutes. Winning miners are awarded a predetermined amount of bitcoin for their success after each interval.
Miners provide a service.
Miners add batches of transactions to the blockchain, which is akin to making entries in an accounting ledger anyone can look at. These transactions have been verified by other network participants and sit in a holding depot of sorts called a memory pool (or “mempool”). From the mempool, miners take transactions and package them in blocks.
Mining is the process of adding those blocks to the chain. For this service, miners are paid a fee for each transaction and a set reward for creating the next block in the chain.
Mining is a hashing race.
The technical details of bitcoin mining are extensive, but at its most basic elements, mining is a race to reveal encrypted data. The data hidden in the puzzle miners need to learn is a randomly generated string of numbers called a nonce.
Each block’s nonce is encrypted as a hash, or an algorithmically generated string of letters and numbers that is impossible to decode. Mining is a game built around guessing what the unknown nonce is, and the rules are simple: be the first miner to guess correctly.
Because miners cannot simply “unlock” the hash to learn the nonce, they must generate random nonces of their own, hash them, and compare their hashes to the unknown nonce’s hash.
Finding a matching hash to a block’s public one means the miner has also generated an identical hash. When matching hashes are generated, the new block is added to the blockchain and the winning miner claims their reward. So, to earn bitcoins, miners make new guesses at the encrypted nonce over and over as fast as possible.
Bitcoin’s hashrate serves as an estimate of how much computational activity is spent on this game.