What is surge capacitor and how it will works?

A surge capacitor is used to mitigate (minimize) voltage surges. Capacitor impedance can be modeled as 1/jwC, j = i = imaginary value used in vectors, w is the frequency, and C is the capacitance. A fairly small capacitor on the input to a power supplying circuit will have a large impedance, and so will impact the circuit operation very little due to the low power frequency. Surges are high frequency. When a surge occurs, the capacitor impedance appears much smaller to the high frequency surge, effectively shunting the surge energy to ground; this minimizes the surge with respect to the protected circuitry.