Electrical sockets are supposed to provide a consistent voltage of electricity, and devices you plug into your power outlets depend on this. In some cases, a power spike can occur when the voltage suddenly increases. This can often be caused by lightning strikes, power outages, or malfunctions in the grid the power company is responsible for. A spike is a short increase in voltage, while a surge is one that lasts more than a few seconds. Surges are usually caused by problems with the electrical grid.
Surge protectors use a variety of different methods to do this, but they generally boil down to a system that diverts energy over the safe threshold to a protective component in the surge protector itself. The surge protector ensures that only the normal, safe amount of electricity passes through to your devices.
Whatever the cause, a sudden increase in current can damage electronics that are drawing power from the surging or spiking outlet. It could even render them completely inoperable, the increase in current having damaged them beyond repair.