Spark gap acts as a limiter as spark gap doesn't allow charges to flow unless there is sufficient potential difference between the terminals. And therefore limits the circuit operation voltages . it acts like a switch if there is not sufficient voltage in the capacitor then the circuit behave like an open circuit.
Spark gap is mostly used in series to inductor or emp coil.
Spark gap provides a small pathway for charges to flow and hence generate magnetic field. Emp destroy circuits via principal of induced emf . change in magnetic field causes voltage to build in electronic circuit tracks. And when this voltage exceeds than normal operating voltage the circuit gets blown up.