Capacitors store electrical charge. This charge is built up along one of the capacitors two plates, and is released when there is a short between the plates. Capacitance is measured in farads. One farad is an enormous quantity of charge. Most capactitors are much smaller, in the micro and picofarad range.
A capacitor can be charged almost instantly if it's leads are connected directly to a power supply. It is possible to increase the charging time by adding a resistor between the power supply and the capacitor. The actually formula for determining the charging time is q=qinitial[1-e-t/(RC)]. RC is a time constant equal to the time required for the capacitor to accumulate 63.2% of its equilibrium charge. In addition to releasing it's charge by shorting, a capacitor may also lose it's charge by "leaking" after it is completely charged. This process can be slowed by connectioning a resistor across the two leads of the capacitor. The larger the resistor, the longer the discharge will take. The formula for discharging is q=qinitiale-t/(RC) .
Finding total capacitance is the opposite of finding total resistance, in that when determining the total amount of capacitance in series, you use 1 over the sum of the reciprocals of the capacitors. This gives you Ctotal.When finding the total capacitance in parallel, you just have to add the the values of the capacitors together.
Diodes only allow the flow of current in one direction.