Consensus is reached when all participants in the network agree on the order and content of blocks in the blockchain.
What is consensus?
In centrally organized systems, decisions are made by a single center of power. For example, all companies use a centralized ledger to record all economic transactions conducted by the business. Traditionally, this ledger is managed by the accounting department, which is responsible for maintaining and updating the records.
In blockchain, which is essentially a distributed transaction registry, information is updated by individual miners without a central authority to oversee and monitor the accuracy of entries. Consequently, there is a need for consensus on the exact state of the network at any given time. Reaching such consensus among the many nodes trying to cooperate remotely is no easy task, especially when compounded by the possibility that an unknown number of nodes may fail or intentionally act against the interests of the network, as demonstrated by the Byzantine problem of generals.