6 min read

How Does Blockchain Work? A Step-by-Step Explanation

Imagine a small town that keeps its accounts in one big notebook. Every family has its own photocopy. When the baker pays the miller, someone reads the payment aloud in the square, and every family writes it into their copy. If one family later tries to scribble a fake entry in their notebook, it won’t match anyone else’s, and the town ignores it.

A blockchain is that town notebook, run by computers. The National Institute of Standards and Technology (NIST) calls blockchains tamper-evident and tamper-resistant digital ledgers, kept in a distributed way and usually without a central authority like a bank, company or government.

The rest of this lesson takes the notebook apart, one piece at a time.

Piece 1: the shared ledger#

A ledger is just a list of who paid whom. Banks keep ledgers too, but each bank keeps its own, privately, and you trust the bank to keep it honest.

On a public blockchain, the ledger is copied across thousands of computers called nodes. Anyone can download it and read it. No single copy is “the real one.” The real ledger is whatever version the network as a whole agrees on.

That’s the first big idea: trust moves from one institution to a crowd of copies that keep each other in check.

Piece 2: hashes, the tamper seal#

To make cheating obvious, blockchains lean on something called a hash.

A hash function takes any data (a word, a page, a whole book) and produces a short, fixed-length string of characters, like a fingerprint. Two things make it useful:

  • The same input always gives the same fingerprint.
  • Change even one comma in the input, and the fingerprint comes out completely different.

So if you know a page’s fingerprint, you can check in a split second whether anyone has changed the page. You don’t need to read it line by line. You just rehash it and compare.

Piece 3: blocks, and why they form a chain#

Transactions aren’t added one at a time. They’re gathered into batches called blocks, like pages in the notebook.

Here’s the clever part. Each new block includes the fingerprint of the block before it. The Bitcoin whitepaper describes this as a timestamp server, where each timestamp includes the previous one in its hash, “forming a chain.”

A rough sketch:

[ Block 1 ] <-- [ Block 2 ] <-- [ Block 3 ] <-- [ Block 4 ]
payments payments payments payments
+ hash of 1 + hash of 2 + hash of 3

Now suppose someone edits a payment in Block 2. Block 2’s fingerprint changes. But Block 3 recorded the old fingerprint, so Block 3 no longer matches. Neither does Block 4, or any block after. To get away with the edit, the cheater would have to rebuild every later block, faster than the honest network keeps adding new ones. That’s what makes old entries so hard to change.

Piece 4: who gets to add the next block#

If everyone keeps a copy, someone still has to decide which batch of payments becomes the next official page. Otherwise two people could write conflicting pages at the same moment.

Blockchains solve this with a consensus mechanism, a set of rules for choosing who adds the next block and how everyone agrees on it. The two you’ll hear about most:

  • Proof of work. Computers race to solve a hard puzzle by trial and error. The winner adds the block and earns a reward. This is “mining,” and it’s how Bitcoin runs.
  • Proof of stake. Participants called validators lock up coins as a security deposit. One is picked to propose the next block, others check it, and cheaters can lose part of their deposit. Ethereum has worked this way since Sep 15, 2022, according to ethereum.org.

The proof of work vs proof of stake comparison goes deeper on the trade-offs.

Following one payment from tap to confirmation#

Put the pieces together and here’s what happens when you send crypto. The steps track the network process the Bitcoin whitepaper lays out in its “Network” section:

  1. You sign. Your wallet creates the payment and signs it with your private key, a secret number only you should hold. The signature proves the coins are yours to spend without revealing the key.
  2. It’s broadcast. The signed payment goes out to nodes across the network.
  3. Nodes check it. Each node confirms the signature is valid and that the coins haven’t already been spent.
  4. It joins a block. Your payment waits with others until it’s bundled into a new block.
  5. The block is chosen. The consensus rules pick which block comes next (a miner finds the puzzle answer, or a validator proposes and others vote).
  6. Everyone updates. Nodes add the block to their copy. Your payment now sits under the fingerprint of every later block.

Each later block on top of yours is often called a confirmation. More confirmations mean your payment is buried deeper and is harder to undo.

If you’d like to see this with real numbers, the Bitcoin lesson walks through block timing and rewards.

What “decentralized” does and doesn’t mean#

You’ll hear blockchains called decentralized. It means no single computer or company holds the master copy, so there’s no one switch to flip.

It doesn’t mean nobody has influence. Software developers write the code that nodes choose to run. On some networks, a handful of large mining pools or big stakers can end up producing a large share of blocks. And many of the coins people hold are sitting at exchanges, which are ordinary companies. The ledger can be decentralized while your access to it runs through one firm.

Where the notebook analogy breaks down#

The town notebook is a helpful picture, but real blockchains come with limits that the picture hides. These are the ones that hurt beginners.

It can’t undo honest mistakes. The same feature that blocks fraud also blocks refunds. Send coins to the wrong address and the ledger will faithfully record your mistake forever. The Bitcoin FAQ says confirmed transactions can only be refunded by the person who received them.

It only knows what’s written in it. A blockchain can prove a token moved from one address to another. It can’t prove the coin’s project is honest, that a company’s promises are real, or that the person on the other end is who they say. “It’s on the blockchain” is not a seal of approval.

It isn’t private by default. On public chains, every payment and balance is visible to anyone. Addresses aren’t names, but once an address is linked to you (say, through an exchange withdrawal), your history can be traced.

Your key is your only lock. Nobody runs a password reset desk. If someone gets your private key or seed phrase, they can move your coins, and the network will treat it as a valid payment.

Not every “blockchain” is a public one. Some companies run private ledgers where they control who can write. NIST’s overview notes the distinction between permissionless networks anyone can join and permissioned ones. The tamper-resistance story is weaker when one company holds most of the copies.

Where to go next#

Blockchains are the base layer for everything else in crypto. From here, what cryptocurrency is shows what’s built on top, and what a crypto wallet is explains the tool that holds your keys.

This explainer is for learning only. It isn’t a recommendation to buy any coin or use any particular blockchain.