The Leyden jar (or Leiden jar) is a device for storing static electricity. It is large glass bottle, usually lined on both the inside and the outside with some type of metal foil. Some of the early ones had water inside. They allow the experimenter to collect a large amount of charge.
The first electrical storage jar was created by Ewald Georg von Kleist on 11 October 1745. He was the dean of the cathedral of Cammin in Pomerania, on the north coast of Germany (at that time a separate country). He was interested to find whether static electricity could be stored in a bottle, because he knew that electricity could not pass through glass. He thought he might be able to capture and hold a small amount. He only had a small experimental friction generator.
He underestimated how much electricity a small medicine bottle could hold by thousands of times. A peculiarity of electricity allows it to continue flowing into the bottle provided the outside of the bottle has an electrically conductive surface connected to the earth. This neutralises the pressure from the charge trying to flow back out.
In von Kleist's case, this electrically conductive surface was just his hand, but it was enough to allow a very substantial charge to enter and remain in the jar through a nail he had driven through the cork.
When he accidentally touched the nail, he received such a shock that it threw him across the room. He had made a connection between the inside charge and the accumulated outside charge, and since these were opposite signs (one positive and the other negative) all the accumulated charge flowed through his body.
He didn't understand why this jar stored so efficiently, but he send a scrambled description to some associates in Berlin, and one copy was sent on to von Klein's old university associate Andreas Cunaeus where it ended up in the hands of Pieter van Musschenbroek, who was the University of Leyden's main physics professor. He worked out that the storage capacity was vastly improved only if the flask was held in the hand, and his letter to scientist in France gave the jar the name "Leyden jar".
For many years the Leyden jar was the main tool of electrical storage, and it remained so until the invention of a chemical battery and electrical generators of the type we use today.