Once a block is full, the nodes on the network compete to solve a complex computational puzzle.
The first node to answer the puzzle correctly wins the race, adds the block to the chain, and receives a small number of tokens (such as Bitcoin) in exchange.