Transactions work by spending outputs from previous transactions as inputs. A transaction contains inputs which reference the specific outputs being spent, and outputs which send funds to new addresses. If the input amount is greater than the output amount, the difference is considered a transaction fee paid to miners. Transactions often include a change output that returns unspent funds back to an address controlled by the sender. Wallets track unspent transaction outputs and can combine multiple UTXOs as inputs to a new transaction if a single UTXO does not cover the full amount being sent. Signatures in the transaction prove the sender owns the inputs and authorize spending them.