An ideal capacitor can be charged (that is, end up with different numbers of electrons on its two plates, and hence a voltage difference between them) by applying to it a DC voltage source. That source will suck electrons off the plate attached to the (+) side of the source, and push electrons onto the other plate connected to (-). Exactly the same number of electrons will be moved out of one side and into the other. The total number of electrons that are moved out of one side and over to the other is Q, measured in Coulombs; Wiki says one Coulomb is 6.242 x 10^18 electrons. The Voltage necessary to establish this condition is defined by the relationship Q = CV, where C is the Capacitance of the capacitor, in units of Farads (in honor of Faraday). If you then disconnect the voltage source, the ideal capacitor will retain this electron imbalance between sides and hence its voltage. A real capacitor has some current leakage routes, however, so the voltage decays over time.
Now, suppose you connect the capacitor to the voltage source and charge it up. Then you quickly switch the two voltage supply leads to opposite sides of the capacitor. This will force the excess electrons on the negatively-charged plate to be pulled off and pushed over to the other plate, and the end result will be the same imbalance (in terms of numbers of electrons and voltage difference between plates), but the direction of the charge (and voltage) difference will be reversed - the plate originally negative will have been switched to positive charge.
Now, suppose that the voltage source you use is not a dc supply, but an ac signal. The source then, on a repeating basis, moves electrons from one side to the other, then back again, then to the original state, then back to the second state, etc. At any fixed moment in time the capacitor will have a charge on it (with the exception of the brief time slice as its voltage passes through zero volts).
So, with a dc supply it is easy to establish a charge ("charge up") a capacitor and it will keep that charge, even after the voltage source is disconnected, for a while - a long while if the leakage path can prevent leakage. With an ac supply the charge on the capacitor also can be established, but it will change constantly as the supply voltage changes. At the moment that you disconnect the supply the capacitor will have some charge on it. But what charge? Unlike the dc situation where we can predict it, the ac situation leaves on the capacitor a charge that depends entirely on when you disconnected it. If you repeat the experiment you will find a different charge on the capacitor because the disconnection time was different. So a lot of people will tell you you can't quite charge up a capacitor with an ac supply, although the truth is you simply can't charge it up to a predictable state.
When you apply a dc supply voltage to a capacitor with initial charge of zero there is a short time period when there is a current flow. The graph of current flow vs. time is an exponentially decaying curve with a time constant that depends on the product of the capacitor value and the effective resistance in the charging circuit. The actual value of the current depends on this process and the value of the voltage supplied. In a short time that current decays to zero for practical purposes. When you apply an ac supply to the capacitor, the current flow initially also is non-zero and subject to the same current-vs.-time curve. But then the supply changes its voltage, so the current at any given time depends both on the decay curve and the varying supply voltage, so it changes also. The current will change over time and, assuming the voltage supply changes from positive to negative through a zero volt condition, the current flowing also will change from positive (in direction) to negative, and pass through a moment when it also is zero.