At the core of many blockchains are consensus mechanisms that ensure their security and functionality. The two most well-known:
Proof of Work (PoW): As with Bitcoin, it requires miners to solve complex cryptographic tasks (work) that consume a lot of energy. Whoever solves the task first adds the block and receives a reward.
Proof of Stake (PoS): As with Ethereum after the transition to PoS, it requires validators to 'stake' their coins as collateral. The more coins staked, the higher the chance of being selected as a validator to create a new block and receive a reward.
PoW is more energy-intensive, PoS is more energy-efficient. Both have their advantages and disadvantages.