This is a schematic for a crude taser design I've been studying.
From what I can tell when the switch is on the relay turns on and off continuously, which charges up the LC circuit in which the capacitor and primary of the transformer (inductor) continuously charge each other up. Since the circuit turns on and off due to the oscillating relay, according to the law of voltage across an inductor, large voltages are dropped across the inductor, which when multiplied by the transformer create huge voltages on the secondary, thus the sparks.
That all makes sense to me, but I have no idea what the purpose of the bidirectional TVS diode is, apparently it is to clamp the voltage at 350 volts but I have no idea what that means and the Google searches I have made weren't helpful.