Capacitor is the ratio of charge to the potential difference.
It stores energy in the form of an electric charge. When a capacitor is used, the charges continue stop at each end until the voltage becomes high enough so that it goes across the capacitor. A capacitor is equivalent to the power supply. An electric charge will remain in the capacitor until the wires or alligator clips connect , in which the charge will discharge. Diodes allow current to flow in one direction and not the other.