“Mining” is a confusing name for what is really a competition to add the next page to a shared ledger. Understanding the mechanics removes most of the mystery around why Bitcoin is secure and why it uses so much electricity.
Step one: transactions wait in the mempool
When you send Bitcoin, the transaction isn’t confirmed instantly. It sits in a shared waiting area called the mempool, visible to every node on the network, until a miner picks it up for inclusion in the next block.
Step two: miners race to solve a puzzle
Miners bundle pending transactions into a candidate block and then repeatedly try random inputs (a “nonce”) through a hash function, searching for an output below a target value. This is deliberately hard to do but trivial to verify — the entire security model rests on that asymmetry.
Step three: the winner broadcasts, everyone checks
The first miner to find a valid solution broadcasts their block to the network. Every other node independently verifies it — checking the puzzle solution and that every transaction inside is valid — before accepting it and building the next block on top.
Why this makes the ledger hard to fake
Rewriting history would mean re-solving the puzzle for that block and every block built on top of it, faster than the rest of the network is adding new ones. As the chain grows, older transactions become exponentially more expensive to reverse — this is what “confirmations” actually measure.
Why it uses real energy
The difficulty of the puzzle automatically adjusts roughly every two weeks so that a block is found on average every ten minutes, regardless of how much computing power joins the network. More miners competing means more total energy spent solving the same puzzle — a direct, and often debated, cost of the security model.
The reward that pays for all of it
Successful miners earn newly created bitcoin plus the fees attached to the transactions they included. That reward halves roughly every four years, which is also how new bitcoin enters circulation on a fixed, predictable schedule.