Where a wallet balance comes from
Bitcoin records each payment as one or more transaction outputs. An output that has yet to be spent is called an unspent transaction output, or UTXO. A wallet adds up the outputs it can spend and displays the total as a balance. When a later transaction uses a UTXO as an input, it consumes that output in full.
Suppose Alice has a 10,000-satoshi UTXO and wants to pay Bob 3,000 satoshis with a fee of 500. Her wallet can create two new outputs, one paying Bob 3,000 and another returning 6,500 to Alice as change. The difference between the inputs and the outputs is the fee. One BTC equals 100 million satoshis.
From signing to network verification
A wallet uses a private key to create a digital signature that proves it can spend an output. It then broadcasts the signed transaction to the Bitcoin network. Nodes check that the inputs exist, that they remain unspent, and that the signature and other spending conditions are valid. Transactions that pass these checks may enter a node’s pool of pending transactions.
The same output can be spent only once in a valid ledger history. This rule prevents double-spending. Two conflicting transactions may reach different nodes, and only the one included in the valid history can spend the output.
What mining and confirmations do
Miners select transactions for a candidate block and repeatedly hash its header to meet the proof-of-work difficulty target. Other nodes verify the block and its transactions independently. When a miner’s block becomes part of the valid chain, the miner can collect the block subsidy and transaction fees under the protocol’s rules. If nodes see competing valid branches, they follow the branch with the most accumulated work.
A transaction receives its first confirmation when a block on the valid chain includes it. As more blocks follow, rewriting the history that contains the transaction generally becomes harder. The recipient decides how many confirmations to wait for.
Read a payment in a block explorer
Open an ordinary Bitcoin transaction in a block explorer and look for its transaction ID (TXID), inputs, outputs, fee, and confirmation status. Compare the sum of the inputs with the sum of the outputs. The public output list alone usually leaves the purpose of each output and the identities of the people behind the addresses uncertain.