I am planning to build my own from various parts. There are DIY instructions online.
Couple 9 volt batteries in series will make 18-27VDC with a push button and a long steel rod with another graphite rod (for cathode&anode). Graphite is used to prevent excessive corrosion while you use it in salt water.
Or you could use an AC-DC wallwort/adapter. With 18-24 volts (or higher).
Higher voltage implies more "zap" and hopefully more output current.
Basically you are creating a short "spark gap" using the water as your conductor to close the circuit. When you put the anode & cathode nearby, electric current will run across path of least resistance and if an aiptasia or majano is between the spark gap, it will get shocked.
Nothing else will get zapped because electricity runs between shortest path.
(that is why if you are underwater and there is a broken wires, USUALLY, you won't get shocked because electricity will run between the two ends of the broken wire). Of course there are strange situations where there is no GROUND return path and you and whatever you are touching act as the grounding pathway.
In our tanks, these zappers always have a return path to the "other side" of the zapper.
SOOO, that's how they work. I need to get to building mine. And I bought enough parts to build a few more. You cannot most parts from radio shack, fry's, or electronic shop. Harder thing is the graphite rod. I bought unwooded graphite drawing pencils on amazon. You can try to find at art supply stores.