A 51% attack is when a group of miners controlling more than 50% of the computing power on a blockchain network attempt to manipulate the network by reversing transactions or blocking new ones. This can be prevented by having a large and decentralized network of miners.