Cattle prods are similar to stun guns in design -- they apply an electrical current across two electrodes -- but they serve a completely different function. A stun gun uses an electrical charge to incapacitate someone, while a cattle prod applies a charge to get a person or animal moving. A cattle prod only causes pain, it does not significantly affect the muscles and nervous system of the body.
These two devices differ mainly in voltage. The voltage in a stun gun is high enough to dump electricity into the entire body. The lower voltage in a cattle prod only shocks someone at the point of contact.
These days, most stun-gun models have two pairs of electrodes: an inner pair and an outer pair. The outer pair, the charge electrodes, are spaced a good distance apart, so current will only flow if you insert an outside conductor. If the current can't flow across these electrodes, it flows to the inner pair, the test electrodes. These electrodes are close enough that the electric current can leap between them. The moving current ionizes the air particles in the gap, producing a visible spark and crackling noise. This display is mainly intended as a deterrent: An attacker sees and hears the electricity and knows you're armed. Some stun guns rely on the element of surprise, rather than warning. These models are disguised as umbrellas, flashlights or other everyday objects so you can catch an attacker off guard.
These sorts of stun guns are popular with ordinary citizens because they are small, easy-to-use, and legal in most areas. Police and military forces, on the other hand, typically use more complex stun-gun designs, with larger ranges. In the next couple of sections, we'll look at some of these sophisticated stun guns.