**Charging:**

When a capacitor is connected to a battery, positive charge appears on one plate and negative charge on the other. The potential difference between the plates ultimately becomes equal to the emf of the battery. The whole process takes some time and during this time there is an electric current through the connecting wires and the battery.

**$q=ϵC(1−e_{CR−t})$**where $q$ is the charge on the capacitor at time $t,CR$ is called the time constant, $ϵ$ is the emf of the battery.

**Discharging:**

If the plates of a charged capacitor are connected through a conducting wire, the capacitor gets discharged. Again there is a flow of charge through the wires and hence there is a current.

$q=Qe_{CR−t}$

where $q$ is the charge on the capacitor at time $t,Q$ is the charge on the capacitor at time $t=0$ and $CR$ is called the time constant,