It probably uses a small inverter and a Villard or Cockroft-Walton cascade to step that 9V up to over 1000V for the zap. And yeah, the grid would alternate +/-.