In the blockchain system, there is no centralized bookkeeping agency like a bank to ensure the consistency of each transaction on all bookkeeping nodes, that is, it is very important for the entire network to reach a consensus. The consensus mechanism solves this problem.
At present, the main consensus mechanisms are the workload proof mechanism PoW and the equity proof mechanism PoS.
PoW determines the probability of you obtaining the right of bookkeeping by evaluating your workload. The greater the workload, the more likely you are to obtain this bookkeeping opportunity.
PoS determines your probability of obtaining bookkeeping rights by evaluating the number and duration of tokens you hold. This is similar to the dividend system of stocks, and people who hold relatively more equity can get more dividends.