How it works
A capacitor stores charge on two conductive plates separated by an insulator (dielectric). Its capacitance, measured in farads (F), determines how much charge it can hold per volt applied.
In DC circuits, a capacitor blocks steady current once charged but allows current to flow briefly while charging or discharging — this is the basis of timing circuits and debounce filters. In AC circuits, a capacitor's impedance falls as frequency rises, which is why capacitors are used to filter out high-frequency noise or block DC while passing AC signals.
Common types differ mainly in construction: ceramic capacitors (small values, no polarity) and electrolytic capacitors (larger values, polarized — must be wired the right way round or they can fail).