What is “proof of work” or “proof of stake”?

“Proof of work” and “proof of stake” are the two major consensus mechanisms cryptocurrencies use to verify new transactions, add them to the blockchain, and create new tokens.