Is what you want a Tazer or a Stun gun?
The difference between the two is that the Tazer actually shoots the electrodes (followed by some very thin wire) at the ,er, suspect. Tazers are illegal in the US if they use gunpowder, but the
AirTazer uses compressed CO2, so its legal.
With a Stun Gun you have to be in close contact with the, er, suspect. The site that Hombre mentioned shows how to build a Stun Gun, but it is much easier to take the flash unit out of a disposable camera and attach wires to the leads of the capacitor.
I started fooling with these things about 8 years ago, and actually built one into my trenchcoat in highschool

. I have never been hit with one fully charged, but even a residual charge hurts like a mofo.
I had a freind of mine pick up a flash unit that was about 1/4 charged a couple of months ago not knowing what it was. When his skin completed the circuit (and before I could warn him) EVERY MUSCLE IN HIS ARM CONTRACTED. The flash unit flew across the room. and the guy couldnt feel his right side for about 2 hours.
MORAL: dont do it.