Capacitors consists of two plates. When a voltage is applied between the two plates it creates a potential difference and an electric field is established. Electrons move to the negative plates from the positive plates of the capacitors. Positive charge builds up on one side and negative charge on the other.
The electric field holds potential energy. When a load (resistor or a motor) is attached to the plates of the capacitor, it discharges the charge and converts the potential energy stored in the electric field, into electric energy that drives electrons through the resistor or motor. If it is a motor it does work on the motor which is converted into mechanical energy. If it is a resistor, it heats up the resistor.
If we stop applying voltage the charge wants to equalize, and the capacitor will “leak” current to restore even charge on either plates.