Let's have a look inside a capacitor to see what prevent the short circuit.
A capacitor consists of two conducting plates. And there's an isolating plate between the two conducting plates.
How is current able to pass through the the isolating plate?
When there's a change in electrons (charge) on one conducting plate, a change in the charge of the other conducting plate occurs. The two conducting plates affect each other because the isolating plate is very thin. This way current can pass through a capacitor. I consider it as a virtual current.
When you apply an AC signal, a short circuit will happen because there's a rapid change in the charge of the plates.
When the frequency is decreased, lower current can pass. Capacitor is considered as a resistor and this resistance is called "capacitive reactance".
When you apply a DC voltage (zero frequency):
At the beginning, the capacitor will charge because applying DC voltage itself is considered a change in charge.
After completing charging, current will stop flowing because there's no change in the charges.