What is a blockchain and how does it work?

Learn the basics of blockchain technology, how transactions are recorded, and why it matters for crypto.

Mohammed SalmanEditorial Team
Published Sep 9, 20267 min readHow we research this
Illustration of blockchain blocks linked by chains with a padlock

A blockchain is a shared digital ledger that records transactions across many computers so that no single person or group controls it. Each group of transactions is stored in a "block," and blocks are linked in a chain using cryptography. This design makes it very hard to change past records, which is why blockchains are used for cryptocurrencies like Bitcoin and Ethereum.

Think of a blockchain as a notebook that everyone on a network owns a copy of. When someone wants to add a page, the whole group checks it first. If most agree it's valid, the page gets added to everyone's notebook at the same time. No one can rip out a page later without everyone noticing.

Why blockchains were invented

Before blockchain, digital money had a big problem: how do you stop someone from copying a file and spending the same dollar twice? A central authority like a bank solves this by keeping its own records. But that means you have to trust the bank, and the bank can be hacked, make mistakes, or charge fees.

In 2008, a person or group using the name Satoshi Nakamoto published a paper describing Bitcoin, the first cryptocurrency built on a blockchain. The blockchain solved the double-spending problem without a central authority. Instead of trusting a bank, users trust the math and the network of computers that check every transaction. Today, blockchain is used for more than money, but the core idea is still the same: a shared, tamper-resistant record.

How a blockchain works, step by step

Here is the basic process for recording a transaction on a public blockchain like Bitcoin or Ethereum:

  1. Someone requests a transaction. For example, you send 0.5 Bitcoin to a friend. Your wallet creates a message with the details and signs it with your private key.
  2. The transaction is broadcast to the network. It goes to computers called nodes that are running the blockchain software.
  3. Nodes verify the transaction. They check that you actually own the Bitcoin and that you haven't already spent it. They also confirm the digital signature is valid.
  4. Valid transactions are grouped into a block. A special node (often called a miner or validator) collects pending transactions and puts them together.
  5. The block is added to the chain. The new block contains a hash, which is a unique fingerprint of the data. It also contains the hash of the previous block. This links the blocks together.
  6. The network reaches consensus. Other nodes check the new block. If they agree it's valid, they add it to their own copy of the ledger. Now the transaction is permanent.

The linking of hashes is what makes the chain secure. If someone tries to change a transaction in an old block, the hash of that block changes, which breaks the link to the next block. To hide the change, they would have to redo every block after it, and they would need more computing power than the rest of the network combined. That's extremely difficult on large public blockchains.

Key parts of a blockchain

To understand how a blockchain works, you need to know a few terms:

  • Ledger - The record of all transactions. In a blockchain, every node has a full copy.
  • Block - A container that holds a batch of valid transactions, along with a timestamp and the previous block's hash.
  • Hash - A long string of numbers and letters created by a mathematical function. Any change to the input produces a completely different hash.
  • Node - Any computer that participates in the network by storing a copy of the blockchain and validating transactions.
  • Consensus mechanism - The rules the network uses to agree on which blocks are valid. The two most common are proof of work and proof of stake.
  • Public vs. private - Public blockchains (like Bitcoin) are open to anyone. Private blockchains are controlled by one organization and are often used by businesses.

Proof of work requires computers to solve difficult puzzles, which uses a lot of electricity. Proof of stake instead asks validators to lock up some of their own cryptocurrency as a deposit. If they approve invalid transactions, they lose part of that deposit. Both methods make cheating expensive.

Worked example: Alice pays Bob

Let's walk through a simple example with numbers. Suppose Alice wants to send Bob 2 Bitcoin. She creates a transaction that says, "Alice sends 2 BTC to Bob." She signs it with her private key. The network checks that Alice's account has at least 2 BTC.

Now imagine that transaction is bundled with nine others into a block. The block has a hash, and it also stores the hash of the previous block. Here's a simplified table showing how the chain grows:

Block numberTransactionsPrevious hashCurrent hash
100... (older transactions)9f2a...4b7c...
101Alice pays Bob 2 BTC, plus 9 others4b7c...8e1d...
102Bob pays Carol 1 BTC, plus 9 others8e1d...f3a6...

If someone tried to change block 101 to say Alice paid Bob 20 BTC, the hash of block 101 would change. That would no longer match the "previous hash" stored in block 102, so every node would reject the altered block. The network would simply ignore the fake version and keep the original chain.

This is why people say blockchain records are immutable - meaning they can't be changed once they're confirmed. In practice, it's not absolutely impossible to alter, but it would require controlling more than half of the network's computing power or staked coins, which is called a 51% attack.

What people get wrong about blockchain

There are several common misunderstandings about blockchain:

  • Mistake: "Blockchain and Bitcoin are the same thing." Bitcoin is a cryptocurrency that runs on a blockchain. Blockchain is the underlying technology, like the internet is to email. Many other blockchains exist, such as Ethereum, which supports smart contracts and decentralized apps.
  • Mistake: "Blockchain is completely anonymous." Most public blockchains are actually pseudonymous. Your wallet address is a long string of characters, not your name, but every transaction is permanently visible. If someone connects your address to your identity, they can see your entire transaction history.
  • Mistake: "All blockchains are slow and expensive." Bitcoin and Ethereum can be slow and costly when they're busy, but other blockchains handle thousands of transactions per second with very low fees. Also, private blockchains can be fast because they have fewer nodes.
  • Mistake: "Once on the blockchain, data can never be removed." That's mostly true, but there are exceptions. For example, some blockchains can be forked, meaning the community splits and creates a new version. Also, if you lose your private key, you lose access to your funds permanently - no one can recover them.

The risks of blockchain and crypto

Blockchain technology itself is neutral, but using cryptocurrencies carries real risks. Prices can swing wildly, and you can lose a large portion of your money. Scams and hacks happen, and there's no central authority to reverse a fraudulent transaction. If you send crypto to the wrong address, it's gone.

Also, the technology is still young. Rules and regulations are changing, and some projects fail. The U.S. Securities and Exchange Commission (SEC) warns that crypto assets may be subject to little or no regulatory oversight. Before you get involved, understand that this is a high-risk area. This article is educational information only, not advice to buy or sell anything.

Putting it together

A blockchain is a shared, tamper-resistant ledger that lets people record transactions without a central authority. It works by linking blocks of data with cryptographic hashes and using consensus to keep everyone's copy in sync. While it's best known for powering cryptocurrencies, the same technology is being tested for supply chains, voting, and digital records.

If you want to learn more about the practical side, check out our guide on what a cryptocurrency wallet is and how it works. And if you're comparing blockchain investments to traditional ones, you might read about ETFs vs. mutual funds.

Key takeaways

  • A blockchain is a decentralized ledger shared across many computers.
  • Blocks are linked by hashes, making past records extremely difficult to alter.
  • Consensus mechanisms like proof of work or proof of stake validate transactions.
  • Blockchain is the foundation for cryptocurrencies, but it has broader uses.

What This Means For Your Money

How this could affect the money decisions in front of you.

What to understand

Blockchain records transactions without a central authority, which can lower costs but also removes recourse if something goes wrong.

What to watch for

Cryptocurrency prices are volatile, and blockchain projects can fail or be scams.

Put it to work

Frequently asked questions

How is blockchain different from a regular database?
A regular database is usually controlled by one organization, which can change or delete data. A blockchain is distributed across many computers, and no single entity has full control. Changes require consensus from the network, and once recorded, data is very hard to alter.
Do I need to understand blockchain to use Bitcoin?
No, you can use Bitcoin like digital cash without knowing the technical details, just as you can use email without understanding the internet. However, understanding the basics helps you avoid mistakes like losing your private key or falling for scams.
Can blockchain be hacked?
Large public blockchains are very secure, but they aren't 100% hack-proof. A 51% attack, where someone controls most of the network's computing power, could allow double-spending. Smart contracts and exchanges have also been hacked, but the blockchain itself is usually not the weak point.
What is a smart contract?
A smart contract is a program stored on a blockchain that runs automatically when certain conditions are met. For example, a contract could release payment when a package is delivered. Smart contracts are a key feature of Ethereum and other blockchains, enabling decentralized apps.

Sources

Was this helpful?

· be the first to rate

Written by Mohammed Salman — Editorial Team

The MoneyPilot editorial team researches and writes every guide on the site. We explain how consumer finance works in plain English, starting from primary sources (the CFPB, the Federal Reserve, the FDIC and NCUA, the SEC and IRS) and we label every estimate and example as illustrative. Guides with formulas or regulatory detail are also checked by a financial reviewer before they are marked as reviewed. See our editorial policy for how a guide is researched, fact-checked, and kept current.

More from Mohammed Salman

This article is educational information only. It is not financial, investment, or tax advice. Investing and cryptocurrency involve risk, including the possible loss of principal. Verify details with a qualified professional. It was drafted with AI assistance and reviewed by the MoneyPilot editorial team before publication; see our Editorial Policy.

Your Next Money Move

Based on what you just read, take the next step toward a smarter money decision.

More in Crypto