A Leyden jar is an insulating container with conductors on the inner and outer surfaces. When charging the Leyden jar the source of charge is connected to a rod touching the inner conductor while the outer conductor is connected to ground. The inner and outer conductors become oppositely charged. It takes energy to move additional charges to the jar as the charges overcome the repulsive forces of the charges already on the conductors. The jar stores this electrical energy. If the inner and outer conductors are connected by a wire the charges flow and make the two conductors neutral again.
The modern capacitor is an updated version of the Leyden jar consisting of two conductors and an insulator.