the capacitor is connected to a power supply, current starts to flow and negative charge builds up on the plate connected to the negative terminal.
On the opposite plate, electrons are repelled by the negative charge building up on the initial plate, therefore these electrons move to the positive terminal and an equal but opposite charge is formed on each plate , creating a potential difference.
As the charge across the plates increases, the potential difference increases but the electron flow decreases due to the force of electrostatic repulsion also increasing, therefore current decreases and eventually reaches zero.