Most discussions of consensus begin with Byzantine Fault Tolerance (BFT). BFT is derived from the Byzantine Generals’ Problem, and understanding how it relates to decentralized systems allows for the implementation of other consensus algorithms used today.
As explained on Wikipedia (https://en.wikipedia.org/wiki/Byzantine_fault_tolerance):
A group of generals, each commanding a portion of the Byzantine army, encircle a city. These generals wish to formulate a plan for attacking the city. In its simplest form, the generals must decide only whether to attack or retreat. Some generals may prefer to attack, while others prefer to retreat. The important thing is that every general agree on a common decision, for a halfhearted attack by a few generals would become a rout, and would be worse than either a coordinated attack or a coordinated retreat.
Types of Consensus Algorithms
(See for more: https://hackernoon.com/a-hitchhikers-guide-to-consensus-algorithms-d81aae3eb0e3)
- Proof of Work
- Proof of Stake
- Proof of Authority