In an AC circuit, a capacitor allows the flow of alternating current by charging and discharging as the voltage changes polarity, effectively blocking direct current. This means that a capacitor in an AC circuit can store and release energy, causing a phase shift between voltage and current.
In a DC circuit, a capacitor blocks the flow of direct current once it is fully charged. This results in the capacitor acting like an open circuit for DC signals, preventing the flow of current.