Bitcoin Basics Lesson 2 of 4
← Bitcoin Basics | 10 min read

How Bitcoin Works: Blockchain, Mining & Transactions

Go deeper into Bitcoin's technology. Understand how the blockchain works, what miners do, and how transactions are processed.

🎯 Key Takeaways

  • The blockchain is a chain of blocks, each containing a batch of verified transactions.
  • Miners compete to add the next block by solving a computational puzzle (Proof of Work).
  • A Bitcoin transaction includes sender, recipient, amount, and a cryptographic signature.
  • Transactions need 6 confirmations (≈60 minutes) to be considered final.
  • Bitcoin halving cuts the mining reward in half every 4 years, reducing new supply.

How the Bitcoin Blockchain Works

The blockchain is the revolutionary technology that makes Bitcoin possible. At its core, it's a ledger — a record of who owns what. But unlike a bank's private ledger, the Bitcoin blockchain is:

  • Public: Anyone can download and inspect the entire history
  • Distributed: Stored on thousands of computers worldwide
  • Immutable: Once recorded, data cannot be changed without redoing enormous amounts of work
  • Decentralized: No single company, government, or person controls it
  • The Structure of a Block

    The blockchain is literally a chain of blocks. Each block contains:

  • A header — metadata including the timestamp, the hash of the previous block (creating the 'chain'), and the nonce (a number used in mining)
  • A transaction list — typically 1,500-2,500 transactions
  • The Merkle root — a single hash that summarizes all transactions in the block
  • By including the previous block's hash in each new block, every block is mathematically linked to every block before it. Changing one block would require re-mining every block that follows — an impossible task given the network's total computing power.

    Understanding Bitcoin Mining

    Mining serves two critical functions:

  • Creating new Bitcoin — miners receive a block reward for each block they mine
  • Securing the network — mining makes it computationally expensive to attack Bitcoin
  • Here's how mining works:

    Step 1: Miners collect pending transactions from the mempool (a waiting room for unconfirmed transactions).

    Step 2: They assemble these transactions into a block candidate.

    Step 3: They repeatedly try different nonce values (random numbers) and hash the block header. They're looking for a hash that starts with a certain number of zeros — like rolling dice until you get a specific combination.

    Step 4: The first miner to find a valid hash broadcasts the block to the network. Other nodes verify it and add it to their copy of the blockchain.

    Step 5: The winning miner receives the block reward (currently 3.125 BTC after the 2024 halving) plus all transaction fees in the block.

    The difficulty of finding a valid hash adjusts automatically every 2,016 blocks (≈2 weeks) to maintain an average block time of 10 minutes, regardless of how much computing power joins or leaves the network.

    The Bitcoin Halving

    Every 210,000 blocks (approximately 4 years), Bitcoin's block reward is cut in half. This is called the halving:

  • • 2009: 50 BTC per block
  • • 2012: 25 BTC per block
  • • 2016: 12.5 BTC per block
  • • 2020: 6.25 BTC per block
  • • 2024: 3.125 BTC per block
  • Halvings reduce the rate at which new Bitcoin enters circulation. Historically, each halving has been followed by a significant bull market, as supply growth drops while demand remains constant or grows.

    How a Bitcoin Transaction Works

    Let's trace what happens when you send 0.1 BTC to a friend:

    1. You create the transaction Your wallet software creates a transaction that specifies: the input (where your Bitcoin comes from), the output (your friend's address), and the amount.

    2. You sign it with your private key Your wallet signs the transaction with your private key — a cryptographic signature that proves you own the Bitcoin without revealing your private key.

    3. The transaction broadcasts to the network Your wallet sends the signed transaction to nearby Bitcoin nodes, which relay it across the globe within seconds.

    4. Nodes verify the transaction Each node checks: Does the sender have enough Bitcoin? Is the signature valid? Is this a double-spend attempt? Valid transactions enter the mempool.

    5. A miner includes it in a block Miners prioritize transactions with higher fees. Your transaction gets bundled into a block.

    6. Confirmations accumulate Once in a block, your transaction has 1 confirmation. Each new block added after it adds another confirmation. Most services consider 3-6 confirmations as final.

    Understanding UTXOs

    Bitcoin uses a unique accounting model called Unspent Transaction Outputs (UTXOs). Rather than tracking account balances, Bitcoin tracks individual chunks of Bitcoin that haven't been spent yet.

    Think of it like physical cash. If you have a $20 bill and spend $7, you don't get back $7 — you get $13 in change. Bitcoin works similarly: when you spend a UTXO, the entire amount is consumed, and you get 'change' back to your own wallet.

    Bitcoin Nodes vs. Miners

    These are often confused but serve different roles:

    Nodes enforce Bitcoin's rules. They verify every transaction and block, reject invalid ones, and maintain a full copy of the blockchain. Anyone can run a node — it costs very little.

    Miners create new blocks. They require specialized hardware (ASICs) and massive electricity. They earn Bitcoin for their work.

    Running a node doesn't earn money, but it contributes to the network's decentralization and security.

    In the next lesson, we'll cover Bitcoin wallets — the tools you need to safely store and send Bitcoin.

    Frequently Asked Questions

    How long does a Bitcoin transaction take?
    A Bitcoin transaction is typically included in a block within 10-30 minutes. Most exchanges and services consider it confirmed after 6 block confirmations, which takes about 60 minutes. You can pay a higher fee to get faster confirmation.
    What happens when all 21 million Bitcoins are mined?
    Bitcoin miners will be rewarded entirely through transaction fees rather than block rewards. This is expected to happen around the year 2140. Bitcoin's security model is designed to remain sustainable through fees alone.
    Can Bitcoin's code be changed?
    Yes, but it requires consensus from the majority of the network. Any change must be adopted by node operators, miners, and the community. This makes controversial changes nearly impossible — which is both Bitcoin's strength and a limitation.
    🎓

    加密学院教育团队

    Free crypto education, simplified for everyone.

    Ready to Put Knowledge Into Practice?

    Compare exchanges, use our tools, and start your crypto journey.