Capacitors have a variety of functions.
If you have an alternating voltage source (AC) and stick it in a circuit with the capacitor, the capacitor acts as a short-circuit.
If you have a DC voltage source and stick it in a circuit with a capacitor, the capacitor effectively acts as a...