A capacitor has the ability to store electrons. The number or amount of electrons a capacitor can store is referred to its capacity to hold electrons or capacitance. Capacitors are made by two metallic plates that are separated by a nonconductive material. The way capacitors work is simple:
You have a circuit with a capacitor, a light, and a switch. Initially, when you flip the switch, a voltage is applied that forces electrons through the switch to the top plate of the capacitor. This creates a builds up of electrons on the top plate. This causes a difference in potential and it forces the electrons to be pulled to the positive end of the other voltage source. During this time, as more current is released into the capacitor, eventually an abundant amount of electrons are accumulated onto the plate. The positive side already has enough electrons stored on it so there is no more room for more, therefore current stops flowing. Because of the capacitors ability to block current flow, it is often used as a filter.