It takes some time for the capacitor to get fully charged. During this time there is current flowing in the capacitor electrons are flowing into its negative plate and accumulate negative charge there, while electrons leave from its positive plate and accumulate positive charge there. After the end of this time capacitor is fully charged and acts as a switch and there is no more current flowing in the circuit.