A surge protector or simple capacitor or varistor can protect against most overvoltage conditions, while a lightning arrestor protects against severe spikes.
This allows delicate electronics equipment to be connected to an independent circuit breaker, usually including a surge protector or an uninterruptible power supply backup.