The simplest way is to use a device called a varistor. In a normally operating circuit, it appears as an open circuit. If the input voltage exceeds the rated voltage of the varistor, it starts to conduct. By installing one across the hot and neutral input path (or + and - terminals for a DC/DC supply), if there is an overvoltage condition, the varistor will effectively short the two lines together causing your upstream fuse to blow hopefully without damaging the expensive parts of your power supply.
There are other methods too including the use of diodes, snubber circuits, crowbar circuits, etc. All of them have their advantages and disadvantages and it's up to the system designer to choose the one that best meets their requirements.