Know your enemy Mains irregularities come in four flavours - surges, sags, spikes and outages. A sag is a similarly lengthy decrease. By and large, computer power supplies deal with both of these quite well, though it of course depends on the severity of the irregularity, not to mention the quality of the power supply, and how much of its capacity is being used by the computer. The closer to maximum capacity a power supply is, the less likely it is to handle a given surge or sag. Outages are plain old blackouts, which are the Russian roulette of computing - you'll probably get away with no damage or only minor system corruption if the power drops out, but if you're writing to the only copy of an important file at the magic moment, you can kiss it goodbye.
Spikes are the real nasties.
A spike is a brief increase in the supply voltage - less than 2.5 seconds, often a lot less. For a fraction of a second, a spike can easily subject your equipment to several hundred volts. If this doesn't blow something up outright, it can progressively damage power supply and other components. If lightning directly strikes the power lines near your house, you will have a very exciting time and probably lose some gear, unless everything is unplugged. Fortunately, direct strikes to power lines are rare, because, by definition, a power line is well isolated from earth, and the lightning is looking for an earth.