A blockchain works by grouping transactions into "blocks," linking each block to the one before it with a cryptographic fingerprint, and having thousands of independent computers agree on which block comes next. That combination of chained blocks plus network-wide agreement is what makes the record tamper-resistant without a central authority. Here's how each piece fits together; our beginner's guide to blockchain covers the bigger picture. The Ethereum Foundation's documentation on blocks walks through the same machinery in detail.

Blocks and hashes

Each block bundles a batch of recent transactions along with a timestamp and a hash, a short fingerprint, of the previous block. Change one character anywhere in a block and its hash changes completely, which breaks the link to every block that follows it. That's the mechanism that turns a list of blocks into a genuine chain.

A hash is worth understanding on its own, because it is doing most of the work here. Feed any amount of data into a hashing function and it returns a fixed-length string of characters, always the same length whether the input was one word or an entire library. The same input always produces the same output, so anyone can recheck it. But the output is unpredictable: nudging the input by a single comma produces a completely different hash, with no resemblance to the previous one. And the function only runs in one direction. You cannot start from a hash and work backward to the data that produced it.

Put those properties together and a hash becomes a tamper-evident seal. Storing the previous block's hash inside the current block means each block carries a compressed summary of everything that came before it. If someone alters a transaction in block 400, that block's hash changes, so the copy of it recorded in block 401 no longer matches, and the mismatch cascades forward through every block after it. Nothing needs to detect the edit directly. The chain simply stops adding up, and any node can spot that in seconds by recomputing the hashes itself.

Nodes

Nodes are the computers running the blockchain's software, each keeping a full copy of the ledger and checking new transactions against the network's rules. There's no single server to hack or shut down; thousands of nodes would all have to be compromised at once for the record to be altered undetected.

The crucial detail is that nodes do not trust each other, and are not asked to. When a new block arrives, a node verifies it independently: are the signatures valid, do the senders actually hold the funds they are spending, does the block follow the size and format rules, does its hash correctly reference the block before it? A block that fails any check is discarded, no matter who sent it. There is no authority a node defers to, which is why no participant, however large, can push an invalid block through by insisting on it.

Consensus

With no central authority, nodes need a way to agree on which block gets added next. That agreement process is consensus. The two dominant approaches are Proof of Work, where miners compete to solve a computational puzzle, and Proof of Stake, where validators lock up currency as collateral instead. We compare the two consensus models side by side separately.

The problem consensus solves is subtler than it first appears, and it is not about detecting fraud, since the validation rules already handle that. It is about ordering. Two people on opposite sides of the world can broadcast valid transactions at the same instant, and different nodes will hear about them in different orders. Both versions of history are internally consistent. Something has to break the tie, or the network splits into two ledgers that never reconcile, and the currency stops being one currency.

Both mechanisms break the tie the same way underneath: make proposing a block expensive, and reward proposers for building on the chain everyone else is building on. In Proof of Work, the expense is electricity spent solving a puzzle that has no shortcut. In Proof of Stake, the expense is capital locked up that the protocol can destroy if the validator misbehaves. Either way, following the rules pays and attacking does not, and the network converges on a single ordering not because anyone decides it but because it is in each participant's own interest.

Brief disagreements are normal and expected. Two miners occasionally find a block at nearly the same moment, and the network runs on two competing tips for a few seconds until the next block lands on one of them. The shorter branch is abandoned, and its transactions return to the queue. This is why exchanges wait for several confirmations before treating a large deposit as final: each additional block makes the ordering underneath it exponentially harder to revisit.

Why this makes the record immutable

Because each block references the hash of the one before it, rewriting an old transaction would require redoing every block after it, faster than the rest of the network combined. On any established blockchain, that's computationally impractical, which is what people mean when they call the ledger "immutable."

It is worth being precise about that word, because "immutable" overstates what is actually guaranteed. Nothing in the design physically prevents a rewrite. What the design does is make one economically absurd. An attacker rewriting a transaction from last year would have to redo all the work behind every block since, while the honest network keeps extending the real chain, so they would need to out-produce everyone else combined for as long as the attack takes. The cost of the hardware and electricity would dwarf anything they could steal, and succeeding would crater the value of the very asset they stole.

So the accurate claim is not that the record cannot change. It is that changing it costs far more than any benefit from doing so, and the cost grows with every block added on top. That is a security property, not a law of physics, and it is why a young chain with few participants is meaningfully less safe than an established one, even when the software is identical.

A simple analogy

Picture a shared notebook photocopied and handed to thousands of people. Anyone can add a new page, but nobody can secretly rip out or rewrite an old one, because everyone else still has the original copy. That's roughly what a blockchain does with data instead of paper.

Stretch the analogy one step further and the design comes into focus. Each page in the notebook opens by quoting the last line of the previous page, so the pages only make sense in one order. Adding a page requires solving a puzzle in front of everyone, which takes real effort, and everyone who is watching gets paid for confirming the page is legitimate. Forging page 400 now means rewriting every page since, in public, faster than thousands of people writing the real ones. The notebook is not protected by a lock. It is protected by arithmetic.