A capacitor can store electrical energy. Connecting it across a resistor or other device discharges it. Across the resistor there is a potential difference that creates the electric current. When the charge in the capacitor decreases, at the same time the voltage decreases. As a result the rate at which the capacitor is discharged, which is the current, is decreased. The outcome of this is that the capacitor will be completely discharged meaning that both the current and voltage will equal zero. At this time all the energy stored in the circuit will have been transferred to thermal energy at the resistor.
A heater uses electrical power. The power dissipated in a resistor is in return proportional to the resistance and the square of the current that passes through it. As the energy is changed from electrical to thermal the resistor gets hot.
In long distance transmission, current is reduced without reducing power by increasing voltage. The resulting lower current reduces the power loss in the power lines by keeping the current squared factor low. Long-distance transmission lines always operate at high voltage to reduce power loss.
The electrical energy used by many devices is the rate of energy consumption, which is measured in large numbers of joules called a kilowatt-hour. A kilowatt-hour is the amount of energy equal to 3.6*10^6 J. It is a unit of energy that is the product of power and time.