Book a free call

What Is Blockchain, and How Does It Work?

A blockchain is a shared record kept by many computers, where each block links to the one before it. Learn how blocks, consensus and contracts work.

Hertiv engineering teamReviewed by a senior engineer
7 min read
What Is Blockchain, and How Does It Work?
On this page

Short answer

A blockchain is a shared digital record kept by many computers at once. Transactions are grouped into blocks, and each block is linked to the one before it with a cryptographic fingerprint, so changing an old record would break every block after it. No single company owns the record, and the computers on the network agree on what is valid before a new block is added.

What is blockchain?

Blockchain is a shared digital record, called a ledger, that is kept by many computers at once instead of by one company. Transactions are grouped into blocks, and each block is linked to the one before it with a cryptographic fingerprint. That link is what makes the record hard to change after the fact.

Every computer on the network, called a node, holds a copy of the ledger. When a new transaction is proposed, the nodes check it against the rules of the network. If it is valid, it is added to a new block, and every node updates its copy. There is no central office that can edit the record on its own.

Three ideas sit at the core of the design:

  • Shared copies. Many nodes hold the same ledger, so no single failure or edit controls the record.
  • Linked blocks. Each block contains the fingerprint of the block before it, so changing an old entry breaks the chain after it.
  • Agreed rules. The network only accepts a block when enough nodes agree it follows the rules.

Blockchain is best known as the technology behind cryptocurrencies, but the same design is used for supply chains, identity records, tokenised assets and voting systems. The common thread is a group of parties that need one shared record without trusting a single keeper of it.

How does a blockchain record a transaction?

A blockchain records a transaction in five steps, from the moment someone sends it to the moment it is locked into the chain.

  1. Send. A user signs a transaction with their private key and sends it to the network. The signature proves the sender owns the funds or the asset.
  2. Broadcast. Nodes pass the transaction around and check that it is well formed and that the sender has what they claim to send.
  3. Collect. Valid transactions wait in a pool until one is picked up and grouped into a new block.
  4. Agree. The network runs its consensus process, and the nodes agree that the block follows the rules.
  5. Confirm. The block is added to the chain, and later blocks build on top of it, which makes it harder to reverse with each block that follows.

Confirmation takes time, and the time varies by network. Some chains confirm a block in seconds, others in minutes. For payments and settlement, teams usually wait for several blocks before treating a transaction as final.

What is inside a block?

A block holds more than a list of transactions. It also carries the data that ties it to the chain and proves when it was made. The table below covers the main fields.

Field What it holds Why it matters
Transactions The transfers or actions in the block The actual business of the chain
Previous hash The fingerprint of the block before it Links the blocks into a chain
Timestamp When the block was created Orders the record in time
Block hash The fingerprint of this block Proves the block has not changed
Nonce A number used in proof of work Part of how miners prove effort
Merkle root One fingerprint covering all transactions Lets a node check a transaction quickly

The fingerprint, or hash, is a short string produced from the block's contents. Change one character in a transaction and the hash changes completely, which is how the network spots tampering. That is also why a block, once buried under later blocks, is treated as settled history.

How do networks agree on what is valid?

Networks agree on what is valid through a consensus mechanism, which is the set of rules that decides who may add the next block and how disputes are settled.

Mechanism How a block is added Trade-off
Proof of work Computers race to solve a puzzle; the winner adds the block Very secure, but uses a lot of energy
Proof of stake Validators are picked in proportion to the tokens they lock up Far less energy, but needs fair validator rules
Delegated proof of stake Token holders vote for a small set of validators Fast, but power sits with few validators
Practical Byzantine fault tolerance Known validators vote on each block Fast and final, but suits small, known groups

The choice of mechanism shapes the whole network. Proof of work fits open networks where anyone may join, while voting-based designs fit private networks run by known companies. If you are choosing a chain, the mechanism is one of the first things to check, and proof of stake is the design most new networks now use.

What is the difference between public, private and permissioned blockchains?

Blockchains differ in who may join, who may write and who may read. The table below shows the three common designs.

Type Who can join Typical use
Public Anyone Cryptocurrencies, open DeFi
Private One organisation Internal records, audits
Permissioned Approved members only Banks, supply chains, consortia

A public chain trades speed and control for openness. Anyone can run a node and check the record, which is why public chains suit money and open markets. A permissioned chain trades openness for speed and privacy, which suits a group of companies that already know each other and need to share records without sharing them with the world.

The wrong choice is common. A team that needs privacy should not build on a public chain and hope nobody reads it, and a team that needs open audit should not hide the record in a private chain. Match the design to who must be able to verify the record.

What are smart contracts?

A smart contract is a program stored on a blockchain that runs automatically when its conditions are met. It is not a legal document and it is not smart in the human sense. It is code with rules, such as 'if payment arrives, release the token', that the network executes without a middleman.

Smart contracts are what turn a blockchain from a record into a platform. They power token sales, lending, insurance payouts, royalties and voting. The contract holds the rules and the funds, and every node runs the same code, so the outcome is the same for everyone who checks it.

Two limits matter. A contract cannot read data from outside the chain on its own, so it needs an oracle for prices, weather or delivery status. And a contract, once deployed, is hard to change, so a bug in the code is a bug in the system. That is why teams audit contracts before real funds are involved, as covered in smart contract development.

Example (hypothetical): a coffee shipment on a blockchain

Example (hypothetical): a coffee importer buys 2,000 bags from a cooperative and sells them to 40 roasters. Today the paperwork travels by email, and a disputed delivery takes 6 days to settle because each party checks its own records.

On a permissioned blockchain, each handover is recorded as a transaction: the cooperative logs the harvest, the shipper logs loading, customs logs clearance, and the warehouse logs receipt. Each record carries a timestamp and the fingerprint of the block before it, so no party can rewrite an earlier entry without the others seeing it.

The numbers are simple. The importer pays $0.40 per bag for the tracking service, which is 2,000 bags times $0.40, or $800 per shipment. A disputed delivery that used to take 6 days to settle now takes 1 day, because all four parties read the same record. Over 12 shipments a year, that saves about 60 days of dispute work.

The chain does not make the coffee better or the shipment faster. It makes the record shared, so a dispute is settled by reading one ledger instead of four inboxes.

What are the common mistakes?

The most common blockchain mistakes are using a chain where a database would do, ignoring the cost of writing data, and treating the code as if it were the law.

  • Using a chain for a single-owner record. If one company controls the data, a database is simpler, faster and cheaper.
  • Putting large files on-chain. Chains are for small records and fingerprints; store documents off-chain and keep only the hash on-chain.
  • Ignoring write costs. Every transaction carries a fee, so a design that writes often can cost far more than expected.
  • Skipping the audit. A smart contract bug is hard to fix after deployment, so review the code before real funds move.
  • Assuming the chain proves the truth. A chain proves what was recorded, not that the record was true when it was entered.

Start with the problem, not the technology. If the record, the parties and the trust gap are clear, a chain may fit. A short build with a blockchain development partner can test that fit before you commit to a full platform.

Key takeaways

  • A blockchain is a shared ledger kept by many computers, with blocks linked by cryptographic fingerprints
  • Transactions are signed, broadcast, grouped into blocks and confirmed by consensus
  • Proof of work and proof of stake are the two most common consensus mechanisms
  • Public, private and permissioned chains suit different groups of readers and writers
  • Smart contracts run code automatically, but they cannot read outside data without an oracle

Frequently asked questions

What is blockchain in simple terms?

A blockchain is a shared digital record kept by many computers at once. Transactions are grouped into blocks, and each block is linked to the one before it, so the record is hard to change. No single company owns or controls the ledger, and the computers on the network agree on what is valid before a new block is added.

Is blockchain the same as Bitcoin?

No. Bitcoin is one application that runs on a blockchain. Blockchain is the underlying design: a shared, linked record kept by many computers. The same design is used for supply chains, tokenised assets, identity records and voting systems that have nothing to do with Bitcoin.

Can data on a blockchain be changed?

In practice, changing an old block means rewriting every block after it and getting the network to accept the new version, which is very hard on a large public chain. On a small private chain with few nodes it is easier, which is why the size and spread of the network matter.

What is the difference between blockchain and a database?

A database is usually run by one owner who can edit it, while a blockchain is run by many nodes that must agree on changes. A database is faster and cheaper for a single owner. A blockchain fits when several parties need one shared record and none of them should be able to rewrite it alone.

Do I need a blockchain for my business?

Only if several parties need a shared record that none of them controls alone. If one company owns the data, a database is simpler. If the record must be verifiable by outsiders, such as a supply chain or an audit trail, a blockchain may be worth the extra cost and complexity.

What is a blockchain node?

A node is a computer that runs the blockchain software and holds a copy of the ledger. Nodes check new transactions against the rules, pass them to other nodes, and, depending on the design, take part in adding new blocks. The more independent nodes a network has, the harder it is for one party to control it.

Found this useful? Share it.
Hertiv engineering team

Written from projects we build for clients: blockchain systems in production. Every post is reviewed by a senior engineer before publishing and updated when practice changes.

About HertivHow we work

Planning a blockchain project? Talk to Hertiv.

A senior engineer replies within one business day. Or see our Blockchain Development service.

Book a free call

Keep reading

All posts

Tell us what you want to build

A senior engineer reads every request and replies within one business day with questions, a rough range, or a call link.

  • NDA on request before any details
  • You own all code, models and IP
  • US, UK and EU time-zone overlap

Your email app should open with your message ready to send. If it does not, write to [email protected].

Prefer email? Write to [email protected]
Estimate costBook a call