Proof of work is the original consensus algorithm in a blockchain network. This means that the algorithm is used to confirm the transaction and creates a new block to the chain. As soon as a miner successfully creates a valid block, they get rewarded.