Originally the fence either side of you and a gate had a small electric current and when you touched it zapped you - Thin kof it like a wire that goes round a horse field to stop them escaping. if you ever have touched one you would relised its more of a pop on your skin then a real electric shock.