In the case of an AC source, we have an alternating voltage which continuously charges and then discharges the capacitor. While charging the capacitor the voltage across the plates of the capacitor rises and the charge also builds up, and when the voltage across the plates decreases the charge will also decrease.