In short The rules by which thousands of independent computers agree on which transactions are valid and in what order.
Proof of Work and Proof of Stake are the two dominant designs. The mechanism decides who may add the next block, what it costs to cheat, and how fast the network can run.