Skip to content
DonateБГ

Beginners

How Bitcoin works

How bitcoin works: a payment system run by a network of computers, with no bank in charge. See how payments, blocks, keys and coins fit together.

By Dimitar Zurnov · Updated 4 Nov 2026
Adapted from Learn Me a Bitcoin by Greg Walker.

Bitcoin is a payment system that runs on a network of computers, and no bank or company runs it. You can send coins to anyone, and anyone can check the record of every payment that has been made. The network keeps one shared list of who paid whom, and new entries are added in batches, about every 10 minutes.

Satoshi Nakamoto described the design in a white paper in October 2008, and the software was released in January 2009. The first block, block 0, was mined on 3 January 2009. Its data includes a headline from The Times about a second bank bailout. The design responded to the financial crisis of 2007 and 2008.

What are the main steps?

The picture below follows one payment from start to finish. Each step passes the payment on, so no single computer controls the whole process from beginning to end.

Five steps take a payment from your wallet to a copy in every node. Your wallet signsNodes pass it onMiner builds a blockMiner shares the blockEvery node adds it
A payment moves through five steps. Each one is covered below.

What is Bitcoin software?

Bitcoin is software that you can download and run on your own computer. When you start it, your computer becomes a node, which connects to other nodes that run the same program.

Together, the nodes keep the same copy of the blockchain. The blockchain is a list of every transaction, meaning every record that moves coins, in the order they were added.

How does a payment reach the network?

Your wallet sends a payment to one node. That node checks the payment against the rules of the network. If the payment passes, the node keeps it in a waiting list called the mempool. It then passes the payment on to the nodes it is connected to, and each of them does the same. Within moments, most nodes have a copy.

Who adds payments to the record?

Miners do. A miner collects waiting payments into a block, then runs the block through a hash function. A hash function is a math step that turns any data into a long code that looks random. The miner changes a small number inside the block and tries again, which gives a new code every time.

A block is valid only when its code is at or below a set target. Codes that low are rare, so finding one takes many tries. The first miner to find a valid block shares it, and other nodes check the block before they add it to their copy. This process is called mining.

Anyone can mine, but the chance of winning grows with computing power. For that reason, most mining now uses specialized machines. A home computer has almost no chance of finding a block on its own.

Why can't someone spend the same coins twice?

A dishonest person could try to spend the same coins twice. They would send one payment to a shop, and then send a second payment to themselves using the same coins. This is called a double spend, and the network is built to stop it.

Nodes accept only one of the two payments, the first valid one they see. Once a block includes one of them, the other can never be confirmed, because its coins are already spent.

Two payments try to spend the same coin, and only one can be confirmed. 1 coin A: to the shop ✓ confirmed B: back to you invalid in a block coin already spent
The network does not need to know who sent the payments. It only needs to see that the coin is already spent.

How is the record hard to change?

Each block stores the hash of the block before it, and that link is what makes the record a chain. If someone changes a payment in an old block, the hash of that block changes. The next block then no longer matches, so it has to be redone too, and so does every block after it.

Nodes follow the longest chain, which is the one with the most work behind it. To rewrite history, an attacker would have to build a longer chain faster than the rest of the network, and keep it up. The older a block is, the more work it would take to change. That is why people wait for a few blocks before they trust a payment, as the sending page explains.

Each block stores the hash of the block before it, so editing one breaks the links after it. Block999Block1,000Block1,001If block 1,000 is editedIts hash changes, so 1,001 no longer matches.Every later block must be redone too.
A hash is a fingerprint of a block's data. Change the data and the fingerprint changes.

Where do new coins come from?

The first transaction in each block is a coinbase transaction. It lets the miner claim the block subsidy, which is a fixed number of new coins, plus the fees paid by the payments in the block.

Since block 840,000 in April 2024, the subsidy has been 3.125 BTC per block. It halves every 210,000 blocks, so the next halving, at block 1,050,000, is expected around 2028. Total supply will never reach 21 million coins. The halving page shows how close the next one is.

How do you own coins?

Coins are locked to keys, not to names. A key pair has two parts. The private key is a secret number. The public key is calculated from it, so you can share it freely. Anyone who knows your public key can lock coins to you, but only your private key can unlock them. Most wallets show a shorter form of the public key, called an address, to give to senders.

A public key or address locks coins, and only the matching private key can unlock them. Lock public key or address signed by you Unlock private key ✓ Check: the network verifies A valid signature unlocks the coins. The private key is never shown.
The lock is public. The private key never appears on the blockchain.

To spend coins, you sign the transaction with your private key. The signature proves that you hold the key without revealing it. The network checks that signature against the lock, and nobody can produce a valid signature without the private key.

Bitcoin has no company that can reset a lost key. If you lose the private keys, nobody can recover the coins. Whoever holds a private key can spend its coins, which is why it must stay secret.

What happens inside a transaction?

Think of the blockchain as a vault full of safe deposit boxes. Each box is an unspent output, which holds some bitcoin and a lock that says who can open it.

To send coins, a transaction opens one or more boxes that you can unlock, and then creates new boxes. Each new box holds an amount and a lock. If you pay someone and keep some change, one new box locks to them, and another locks to you.

When the transaction is mined, the boxes it opened are used up. A later transaction can open the new boxes. This is how payments link together. The transactions and outputs pages in this section explain each part in more detail.

You now have the basics, and the next pages show how to use bitcoin safely:

  • Wallets explains where your keys live and the main kinds of wallet.
  • Exchanges explains buying from a company, and what to watch for.
  • Sending covers addresses, fees and confirmations.
  • Security explains how to protect the keys behind your coins.

In this section: Beginners

All of Bitcoin from zero

Something look wrong? Tell us