There are various consensus mechanisms in blockchain and each has its own unique working process. These mechanisms ensure that there is a unanimous agreement or disagreement amongst the masses. In the case of blockchain, these masses are nodes which are computer servers responsible for validating a crypto transaction. These nodes are intertwined and closely connected to each other. A consensus mechanism specifically ensures that all the nodes are on one page. It also ensures that in case a computer server - a node - gets corrupted or stops working, the rest of the nodes should not. This is how consensus works in a blockchain network.