One of the great innovations introduced with blockchain was solving the Byzantine Generals Problem: coming to consensus in a setting with many unknown and potentially untrustworthy actors. Consensus mechanisms allow blockchains to achieve just that.
Proof of Work
Proof-of-Work (PoW) was the first consensus mechanism that worked in a distributed environment of untrusted parties. Its principle is based on voting on a version of the history with the weight of your computing power.