Bitcoin does not store one changing balance beside each address. Wallet software totals the unspent transaction outputs, or UTXOs, that its keys can spend.
Inputs, outputs, and change
A new transaction uses earlier UTXOs as inputs and creates new outputs. Because an input is spent in full, a wallet normally creates a change output back to itself when the selected inputs exceed the payment and fee.
Using several small UTXOs can make a transaction larger in data size, which can affect its fee.
A wallet balance is assembled from discrete outputs
Each unspent transaction output has a specific value and locking condition. A new payment selects one or more outputs as inputs rather than subtracting from a single account balance.
Unused input value returns as change
If selected inputs exceed the payment plus fee, the transaction creates a change output. Wallet software normally manages this process automatically.
Sources
Educational information, not investment advice.
