Proof-of-stake is the most popular alternative to proof-of-work for securely achieving consensus on a blockchain. Instead of showing that a certain amount of computational work has been done, it requires miners—now called stakers—to show that they have set aside (rendering temporarily unusable) a certain amount of cryptocurrency. This requires any attacker to possess massive amounts of that cryptocurrency, which then becomes worthless if they succeed.
The person who creates the next block and confirms the next batch of transactions is chosen semi-randomly with a probability proportional to the amount of coins staked and for how long. It is the basis of Ethereum's 2.0 upgrade, as the use of randomness decreases the probability of 51% attack in sharding systems.