A capacitor has two plates of conducting material kept at a distance from each other. They are not in contact. A resister or an inductor is a continuous medium of a conductor.
So a capacitor does not pass current in the normal sense. Due to proximity of the two parallel plates, electrostatic induction takes place. Suppose a battery is connected to a capacitor. The potentials on the plates are initially 0. As the potentials at the positive and negative terminals of the battery are different, current flows and then the charges accumulate on the two plates. Due to electrostatic attraction between positive and negative charges on the plates, they remain there.
The charging process continues until a limit on the amount of charge is reached. Then the potential across the capacitor becomes same as that of battery. Then there is no more flow of electrons. and so no more current.
When an AC voltage source is connected to a capacitor, then there is a current continuously that varies according to the voltage. The capacitor gets charged and discharged repeatedly.