When AC voltage is connected with a capacitor, one plate of the capacitor gets charged positively and the other gets negatively charged.
Later when the direction of AC current changes, the capacitor will change its direction, and thus will get discharged.
This process continues in the case of AC voltage.
Current flows without any problem in the AC circuit.
In the case of DC voltage
When DC voltage is connected with the capacitor, one plate of the capacitor gets charged positively and the other gets negatively charged.
When one plate is completely positive charged and the other is negatively charged, the process stops. The capacitor is saturated and the current flow stops.
Further, if DC voltage is increased, the capacitor will get damaged.
Thus, the capacitor blocks the flow of current in DC and behaves like an open circuit.