Learn how a stun gun works and it's history in this easy to read, comprehensive article.
A standard stun gun works fairly simply using two 9V batteries to develop the voltage across the two electrodes.
The batteries are the source of electricity for the circuit inside the stun gun. The circuit contains many different elements including transformers, which serve to amplify the voltage in the circuit while reducing the amperage. In addition, oscillators create a pulse, which in turn charges up the capacitors. The charged capacitors are what deliver the shock to the person by delivering it to the electrodes.
This revealing document covers all aspects of the operation of a stun guns, their history and the different types of stun guns.
This really is an essential read for anyone interested in stun guns and those planning on constructing their own.

