How it keeps the chain safe
Solving the puzzle takes real electricity and specialized hardware. To rewrite past blocks, an attacker would need more computing power than the rest of the network combined, which is enormously expensive on a large chain.
The criticism
Proof of work uses a lot of energy, which draws environmental criticism. Supporters answer that miners increasingly use cheap surplus or renewable power, and that the cost is exactly what makes the ledger hard to attack.