How are transactions confirmed on a blockchain?

Transactions on a blockchain are confirmed through a process known as consensus. All nodes in the network need to agree that the transaction is valid before it can be added to the blockchain ledger. The most common consensus algorithm used today is called Proof-of-Work. This system requires miners, who use powerful computers to solve complex mathematical puzzles in order to confirm transactions and add them to the ledger. If a miner solves the puzzle, the transaction is considered valid and is added to the ledger.