There are different types of consensus algorithms, including Proof of Work (PoW), Proof of Stake (PoS), and Practical Byzantine Fault Tolerance (PBFT).
In PoW consensus algorithm, nodes compete to solve a cryptographic puzzle, with the winner being rewarded with the ability to add the next block to the chain.
PBFT consensus algorithm works by having nodes communicate with each other to reach a decision on the next block to be added to the chain.
Consensus algorithms aim to achieve properties such as safety, liveness, fault tolerance, and scalability.
Safety refers to the property that once a value or decision is made, it cannot be changed or undone.