Capacitors can be used for many things. For example, a common usage is to smooth out rectified AC to maintain a tolerably stable DC voltage as part of a power supply. Another use is to isolate an input from DC components of a signal and allow only the AC element to pass.