A capacitor is an electric device capable of storing energy in the form of electric charges (electric field).
In the most simple form, a capacitor is made of two conductive plates facing each other and an insulator in between, which is normally called a dielectric. The two plates are then attached to wires, that are used to connect the capacitor in an electric circuit.
The schematic diagram reflects exactly the physical nature of the device:
When a capacitor is connected to a power supply, like a battery, electrons leave the plate that is connected to the positive side of the battery, while the same amount of electrons is pushed into the plate connected to the negative side of the battery. Once the difference of charges at the plates of the capacitor is enough to establish a voltage on the capacitor that is identical to the battery, electrons stop moving around the circuit and an equilibrium is reached.
At this point, if the connection with the battery is severed, the capacitor will retain the amount of charges on its plates: extra charges on the negative plate and defect of charges on the positive plate. If we connect a load to the capacitor, for example a resistor, charges will start moving in the circuit pushed by the voltage at the wires, called electrodes, of the capacitor. So, electrons will leave the negative plate moving toward the load, and an equal amount of electrons will move from the load into the positive plate of the capacitor. The movement of the electrons causes the voltage at the plates of the capacitor to lower until, when an equilibrium of charged is reached, the voltage will be zero and the current will stop flowing through the circuit. At this point all the energy that was stored in the capacitor has been used and the capacitor is said to be discharged.
Both during charge and discharge, the ratio between the amount of charge stored on the capacitor and its voltage remains constant. This can be verified experimentally. We define this constant as the capacitance of the capacitor:
C = Q / V
which is measured in Farad. However, since the Farad is a very big unit, capacitors are normally measured in fractions of Farad, like microFarad (μF, 1 millionth of a Farad)), nanoFarad (nF, one billionth of a Farad), and picoFarad (pF, one trillionth of Farad).
Using the above formula, and calculating the work done to move the charges in and out of the capacitor with the help of some calculus, we can determine the energy stored in a capacitor as:
And, finally, the actual capacitance can also be determined by the physical parameters of the capacitor itself. We can see experimentally that the capacitance is directly proportional to the area of the plates of the capacitor, it is inversely proportional to the distance between the plates, and depends on the type of dielectric in between the plates. The type of dielectric is identified in the formula by the Greek letter ε (epsilon). Each type of dielectric has its own value of ε (permittivity), which is the product of the vacuum permittivity and the relative permittivity of the material.
For more information on this subject, please look also to the corresponding video on my YouTube channel.