How Does Proof of Work Prevent the Double-Spending of Cryptocurrencies?
Proof of Work prevents double-spending by creating a chronological and immutable ledger of all transactions. When a new transaction is broadcast to the network, it is included in a block by a miner.
To be considered valid, this block must be accepted by the network and added to the blockchain. To reverse a transaction, an attacker would need to create a longer chain of blocks than the legitimate one, which would require immense computational power.
This makes it practically impossible to alter past transactions and spend the same cryptocurrency twice.