Skip to content
The BTC World

How Bitcoin works

A plain-language tour of the machinery behind Bitcoin, from the moment you press send to the moment your payment is buried under new blocks.

The basics 6 min read Updated November 22, 2026

927,000 927,001 927,002 927,003

Bitcoin can look like magic: money that moves across the world with no bank in charge. Underneath, it is built from a handful of well-understood ideas that fit together neatly. This article walks through them in the order a payment actually experiences them, from the keys in your wallet to the blocks that make a payment final.

Keys and signatures: proving ownership

Bitcoin has no accounts with names attached. Instead, ownership is proven with cryptography.

  • A private key is a very large random number that only you should know. It is the thing that actually controls your bitcoin.
  • A public key is calculated from the private key. The math only works in one direction: anyone can derive the public key from the private key, but nobody can work backward from the public key to the private key.
  • An address is a shorter, encoded form derived from a public key (or from a script). It is what you share with people who want to pay you. See Bitcoin addresses for the different formats.

When you spend bitcoin, your wallet uses the private key to create a digital signature for that specific transaction. Anyone can check the signature against the public key and confirm it is valid, yet the signature reveals nothing that would let them forge another one. Change a single digit in the transaction and the signature no longer matches. Bitcoin uses elliptic curve cryptography for this, with ECDSA signatures and, since the Taproot upgrade, Schnorr signatures as well.

Your wallet manages all of this for you. Most modern wallets generate their keys from a list of 12 or 24 words called a seed phrase, which is why that phrase must be kept secret and backed up.

Transactions and UTXOs

A natural guess is that Bitcoin keeps a balance for each address, like a bank account. It does not. Bitcoin tracks individual pieces of bitcoin called unspent transaction outputs, or UTXOs.

Think of UTXOs as banknotes of any denomination. Your wallet balance is simply the sum of all the UTXOs your keys can spend.

A transaction does two things:

  1. Inputs point to existing UTXOs and prove, with signatures, that the sender may spend them. Each UTXO is spent in full.
  2. Outputs create new UTXOs, each locked to a recipient's address.

A worked example

Say your wallet holds a single UTXO of 0.5 BTC and you want to pay a friend 0.2 BTC.

Part Amount Goes to
Input 0.5 BTC Your existing UTXO, now consumed
Output 1 0.2 BTC Your friend's address
Output 2 0.2999 BTC A new address in your own wallet (the change)
Fee 0.0001 BTC The miner who includes the transaction

There is no "fee" field. The fee is whatever is left over: the total of the inputs minus the total of the outputs. That is why wallets handle change automatically. Forgetting the change output would hand the whole difference to a miner. Fees are explained in detail in Bitcoin transaction fees.

Broadcasting to the network

Once signed, the transaction is sent to the Bitcoin network, which is a peer-to-peer network of computers called nodes. Each node that receives it checks it carefully:

  • Do the referenced UTXOs exist, and are they still unspent?
  • Are the signatures valid?
  • Are the outputs no larger than the inputs?
  • Does it follow all the other rules of the protocol?

If it passes, the node keeps it in its mempool (short for memory pool), a waiting area for valid transactions that are not yet in a block, and passes it on to its peers. Within seconds, the transaction has spread across the network.

At this stage the payment is unconfirmed. It has been announced, but it is not yet part of the permanent record.

Blocks and the blockchain

Transactions become permanent when they are included in a block. A block is a batch of transactions plus a small header containing:

Block 927,000 Previous block's hash 00000000c3e1... Block 927,001 Previous block's hash 00000000a4f7... Block 927,002 Previous block's hash 000000005b20... Each block holds the hash of the one before it: change an old block and every block after it breaks.
Each block carries the fingerprint of the one before it, which is what makes the chain so hard to rewrite.
  • the fingerprint (hash) of the previous block,
  • a summary hash of all the transactions in the block, called the Merkle root,
  • a timestamp,
  • the current difficulty target,
  • a number called the nonce, which miners adjust over and over.

Because each block includes the hash of the one before it, blocks form a chain stretching back to the very first block, mined on January 3, 2009. That chain is the blockchain. Altering any old transaction would change that block's hash, which would break the link to every block after it. To make the altered history valid again, an attacker would have to redo all the work for every following block, while the rest of the network keeps adding new ones.

A block's position in the chain is its block height. You can follow the latest blocks on our network page.

Proof of work and mining

Who gets to add the next block? Bitcoin answers with a competition called proof of work.

Miners take the transactions waiting in their mempool, assemble a candidate block, and repeatedly run the block header through the SHA-256 hash function, changing the nonce (and a few other fields) each time. The output of a hash function looks random, so the only way to find a hash that falls below the network's target is to try enormous numbers of guesses. The first miner to find a valid one broadcasts the block, and the others verify it instantly with a single hash.

The winning miner earns the block reward: newly created bitcoin (the subsidy) plus the fees from every transaction in the block. That reward is what pays for the electricity and hardware that secure the network.

The network adjusts the target every 2,016 blocks so that blocks keep arriving about every 10 minutes on average, no matter how much computing power joins or leaves. The full story, including the difficulty adjustment and the hardware involved, is in Bitcoin mining.

Confirmations: when is a payment final?

When your transaction is included in a block, it has one confirmation. Each new block added on top gives it one more.

1 2 3 4 5 6 Your payment Six confirmations, about an hour: undoing the payment would mean redoing all six blocks.
Every new block added on top of yours counts as one more confirmation.

Why do confirmations matter? Occasionally two miners find a valid block at almost the same moment, and the network briefly has two competing versions of the latest block. Nodes follow the chain with the most accumulated work, so as soon as the next block lands on one side, the other block is abandoned and its transactions return to the mempool. Each extra block makes reversing your transaction exponentially more expensive.

Common practice:

Situation Typical confirmations
Small, low-risk payment 0 to 1
Everyday payment 1 to 3
Large amount 6 or more

Six confirmations is a convention that dates back to Bitcoin's early days. The original whitepaper shows how quickly the chance of an attacker catching up shrinks with each additional block. Exchanges and services set their own requirements.

Nodes: the referees

Miners propose blocks, but they do not get to decide the rules. That job belongs to full nodes.

A full node downloads every block since 2009 and independently checks every transaction against the protocol rules: no coins created out of thin air, no double spends, no invalid signatures, no block reward larger than allowed. A block that breaks any rule is rejected, no matter how much work went into it.

Anyone can run a full node on an ordinary computer, and thousands of people and businesses do. This is what keeps Bitcoin decentralized: miners who break the rules simply waste their electricity, because nodes ignore their blocks.

Many mobile wallets do not run a full node themselves. They rely on lighter methods or on a server to look up transactions, which is more convenient but means trusting someone else for some information.

Changing the rules

Because every node enforces the rules independently, changing Bitcoin is deliberately slow. Upgrades are written up as proposals (BIPs), debated in public, and only take effect if the network broadly adopts them. Most upgrades are designed as soft forks, which tighten the rules in a backward-compatible way, so older nodes keep working. SegWit in 2017 and Taproot in 2021 were both soft forks. A change that loosens the rules is a hard fork, and if part of the community refuses it, the chain can split in two.

Putting it all together

Here is the life of a payment in one list:

  1. Your wallet selects UTXOs, builds a transaction and signs it with your private key.
  2. Nodes check it and relay it; it waits in their mempools.
  3. A miner includes it in a candidate block and finds a valid proof of work.
  4. Nodes verify the block and add it to their copy of the blockchain.
  5. New blocks pile on top, and your payment becomes harder to reverse with each one.

No step requires trusting a bank, and every step can be checked by anyone. That, in short, is how Bitcoin works.