Blockchain is a distributed decentralized peer-to-peer network aiming to facilitate the immutability and security of data. Towards the service orientation, blockchain is a collection of distributed blocks having unique hash codes without any point of failure. Each block is stored on distributed ledgers, and transactions with them are secure, transparent, immutable, and traceable. To create a new block and allow a transaction to complete, an agreement between all parties is required. To reach an agreement in a blockchain network, consensus algorithms are used. In this chapter, fundamental principles and algorithms of blockchain networks have been discussed, and a detailed review of the blockchain consensus algorithms PoW, PoS, DPoS, PoET, PoWeight, PoB, PoA, and PoC have been provided including the merits and demerits of consensus algorithms with analysis to provide a deep understanding of the current research trends and future challenges.