Bitcoin works like this: you sign a payment with a private key, a network of computers called nodes checks it, miners bundle valid payments into a block, and that block is added to a shared chain about every ten minutes. Each new block that lands on top of your payment makes it harder to undo.
That is the short answer to how bitcoin transactions work. Below, the same process is split into steps, with a plain look at who does what, what a confirmation really is, and why nobody can spend the same coin twice. If you want the big picture first, start with bitcoin basics for beginners.
Who does what on the network
Three roles show up again and again, and one person can play several of them:
- Users and their wallets. A wallet creates and signs payments. It stores your private keys, not coins.
- Nodes. These computers hold a copy of the ledger, check every payment and block against the rules, and pass valid ones along. See what a bitcoin node is.
- Miners. They collect waiting payments into a candidate block and spend computing power trying to earn the right to add it. Every node then checks the result, and a block that breaks the rules is thrown out, however much work went into it.
How a bitcoin transaction works, step by step
- You build the payment. Your wallet picks which of your coins to spend, sets the amount and the recipient's address, and adds a fee.
- You sign it. Your private key produces a digital signature that proves you may spend those coins. The key itself never leaves your wallet, and the signature covers the payment details, so changing the amount afterward would break it.
- You broadcast it. The wallet sends the signed payment to a node, which tells its neighbors, which tell theirs. Within seconds, most of the network has seen it.
- Nodes check it. Each node confirms that the signature is valid and that the coins being spent exist and have not been spent already. Valid payments wait in that node's mempool, its list of payments not yet in a block.
- A miner includes it. Miners usually favor payments with higher fees, so a payment with a very low fee can wait a long time.
- A block is found. When a miner finds a valid block, it announces it. Nodes check the block and every payment inside it, then add it to their copy of the chain.
- Confirmations build up. Your payment is now in a block. Every later block adds one more layer on top.
How bitcoin tracks coins: unspent outputs
Bitcoin has no account balances written into the protocol. Instead, every payment spends earlier outputs and creates new ones. An output that has not been spent yet is called a UTXO, short for unspent transaction output, and your wallet balance is simply the total of the UTXOs your keys can spend.
A UTXO is spent whole, so most payments include change. Suppose your wallet holds one output worth 1,000,000 sats and you want to send someone 300,000 sats. The transaction spends the entire output and creates two new ones: 300,000 for the recipient and 699,000 back to a fresh address of yours. The missing 1,000 sats is the fee, because the fee is just the inputs minus the outputs. That is why a wallet sometimes shows a payment that seems bigger than what you sent.
What is in a block?
A block is a batch of payments plus a short header. The header carries a fingerprint (a hash) of the previous block, a summary fingerprint of all the payments inside, a timestamp and a number the miner can change. Because each header includes the previous block's fingerprint, the blocks form a chain, and altering an old block would change every fingerprint after it.
The first payment in every block is special. It pays the miner: newly issued bitcoin plus the fees from that block, up to limits the rules set. Our guide to what a bitcoin block is goes deeper, and what bitcoin mining is covers the miner's side.
What a confirmation means
A transaction with no block yet is called unconfirmed. Once it appears in a block it has one confirmation, and each block stacked on top adds another. More confirmations mean more work would have to be redone to reverse it, so the risk shrinks quickly.
You will often hear that six confirmations is the safe number. The Bitcoin wiki calls that figure an arbitrary default, and says higher-value payments may call for more. In practice, a coffee can be accepted with none or one, while a large payment deserves a longer wait. At ten minutes a block on average, six confirmations usually takes about an hour.
Why you cannot spend the same bitcoin twice
Digital files are easy to copy, so the hard part of digital money is stopping someone from paying two people with the same coin. Bitcoin solves it by publishing the whole history, so every node can check whether a coin was already spent.
If someone broadcasts two conflicting payments using the same coin, nodes by default keep whichever they saw first and reject the other. Only one can end up in a block, and once it does, the other is invalid everywhere. To rewrite that, an attacker would need to redo the work for that block and all the ones after it, faster than the rest of the network. The proof of work guide explains why that gets very expensive.
Why transactions can wait
Blocks have a limited size and arrive about every ten minutes, so when many people want to pay at once, there are more payments than space. Miners take the ones that pay the most per unit of space first. If you are not in a hurry, a lower fee is fine, but it may take longer. Our guide to bitcoin transaction fees covers how fees work.
Wear the machinery
If you like the parts of bitcoin that run quietly in the background, a few tees fit. The Tick Tock, Next Block tee puts a ringing orange twin-bell alarm clock between its two lines of white type. The Node Runner tee shows an orange outline of a server box with its status lights on, and the Proof of Work tee swings an orange pickaxe over big white capitals. They are printed on black unisex tees, and the full lineup is in our bitcoin tech shirts and bitcoin t-shirts collections.
Sources: the bitcoin white paper, the Bitcoin developer guide on transactions and the Bitcoin wiki on confirmations.


