$Q=CV \Rightarrow \frac {dQ}{dt} = I = C \frac {dV}{dt}$
The voltage across the capacitor is equal to the voltage of the supply.
So whatever the voltage of the supply does the voltage across the capacitor exactly follows.
At time $t_A$ the capacitor is uncharged and the voltage across the capacitor is zero.
However at this time the voltage of the supply is increasing most rapidly so the change of charge on the capacitor, the current, is a maximum.
As time goes by the rate of change of voltage decreases so the current decreases until at time $t_B$ the voltage has reached a maximum and the capacitor is fully charged which means that the current is momentarily zero.
At time $t_B$ the voltage is a maximum but at a time which was a quarter of a period before that, at time $t_A$, the current was a maximum.
Whatever the current does the voltage does a quarter of a period later - the current leads the voltage by $\frac \pi 2$.
The voltage now starts to drop and so the capacitor starts to discharge, the current direction reverses and at time $t_C$ the capacitor is totally discharged but the rate of change of voltage and hence the magnitude of the rate of charging, the current, is a maximum.
The current was zero at time $t_B$ whilst the voltage was zero a quarter of a period later at time $t_C$ - the current still leads the voltage by $\frac \pi 2$.
And so the cycle continues.
As long as there is an alternating voltage the charge on the capacitor will change and so a current will flow.
Now imagine that at time $t_A$ the voltage starts to rise but this time the voltage reaches a maximum at time $t_B$ and then does not change any more.
The capacitor is fully charged and as the voltage across is not changing then the charge on its is not changing so there is no current - this is the DC situation - constant voltage across the capacitor with no current flowing.