When it comes to the line between computer and wall socket, such protectors are extremely useful. A spike would not damage your computer, because the excess of electricity is shunted to ground.
By installing voltage regulators, one can easily avoid issues occurred by power failure. Prices of such regulators vary from case to case. You may need several thousand dollars to protect a large computer. On the other hand, a home computer can be protected through a small regulator costing only a few dollars.
Uninterrupted Power Supply (UPS)
This is possibly the best solution. A combination of rechargeable batteries and a small device, UPS saves you from a blackout or brownout. It quickly provides power to the system, when the main line goes dead. UPS may prove an expensive solution, if you are using a heavy machine.