I really can't understand your doubt.
Capacitor (and inductors) are at imaginary dominium (ideally they do not have real behavior) components.
Why is the current 90° out-of-phase? Because they store energy. Those components have to charge, store energy.
In case of a capacitor, yes, it starts as a short, after it is fully charged, it is a open circuit. But this is in DC/Transient.
As Roff said the current in a capacitor is C*dv/dt.
But in permanent sinoidal state, (the circuit is stabilized, afer turning it on in a sine wave AC), a capacitor is an impedance, that is, a "resistance" an real part and a imaginary part.
Zc = 1/(jwC) ohms and phase = arctan(Xc/R) rads. Xc = 1/(wC) ohms
As you can see, if you have a resistance in parallel/series with the capacitor, the phase will not be 90° anymore.
In AC, there is a bit useless to think in charge/discharge of capacitors/inductors, you consider it as impedances.
But YES, when the AC = Peak, the supply charges the capacito, when AC = 0V, capacitor discharges back to the supply.