My father in law gave me one of these for Christmas a few years back. I wrote it off as a toy but it actually works. I found out how well it works when I accidentally touched my thumb against the rails. Holy Moses!!!! All of that from a 9v battery. And an old one at that.
So theory-wise I want to understand this better. It seems that a lot of the voltage is being traded for current somehow. And the rails must alternate pos and neg so your bug (or thumb) can complete the circuit.
That's pretty much how it works, like an ignition coil in a car; 12 volts in and a gazilion volts out. I got one about two years ago and got a lot of use out of it for my outdoor bar. Sadly, I dropped it and broke the handle part where the battery is held.
They do well for small insects, but don't work especially well with wasps for some reason. Let me tell you, they are NOT happy after getting a taste of about 2KV. I've also found that moths tend to catch on fire and they stink!
I assume it is a simple multivibrator circuit feeding a transformer. The collapsing field in the primary can generate some huge voltages on the secondary. I have seen simple tricks with a two winding relay, picked through a N/C point through the low impedance coil that will create a lot of voltage on the other coil. A nice but noisy "one part" zapper. You can put a capacitor across the points to protect them and increase the zap.