The system that bitcoin runs on is called “blockchain.” Think of it as a modern version of an old-fashioned bookkeeping ledger, but instead of a handwritten list of entries and calculations, a blockchain is a digital list of entries and calculations. A “block” is simply a bundle of transactions. Think of a block as a whole page of transaction in the old-fashioned ledger. A blockchain is just a chain of blocks. It’s the same as a whole series of pages in the old-fashioned ledger.
Easy, huh? Here’s how it works: The Bitcoin blockchain actually exists in every one of the millions of computers on the network as exact copies of each other. However, for this example, so that we can zoom in and you can really see just how a blockchain works, I’m going to show it as one giant blockchain in the middle of a small network of computers.
Let’s follow a pizza transaction with bitcoin. When the transaction occurs it first appears on the network in a pool of unconfirmed transactions along with thousands of others from all around the world. Millions of different computers from the network then gather some of these transactions and place them in their own blocks. The computers are all creating blocks constantly in the hope that theirs will be the next one added to the official chain.
A new block is added to the chain every ten minutes or so, when one of the computers wins the right to have its block recognized as the next in the chain and is rewarded with a prize of newly created bitcoins. The way a computer wins the prize is by trying to guess the answer to an extremely difficult math problem. In fact, the problem is so difficult that even with millions of computers making guesses billions or even trillions of times per second it still takes roughly 10 minutes to find the answer. Once one of the computers guesses the correct answer and wins, all of the millions of computers on the network that did not win are instructed to throw away all the work they have done, update their ledgers with the block from the winning computer, and start again with a new math problem.
In doing so, the computers use an immense amount of power and cost a literal fortune to run. So why do they do it? Because it can be very profitable. This is where the term “mining for bitcoins” comes from. Instead of striking gold by mining for precious metals in the wilderness, these computers are hoping to strike bitcoin by mining precious numbers on the blockchain.