Electrical energy from the mains is fed to the battery through the charger during
charging. The charger uses electromagnetic components like a transformer or an
inductor. Here, electrical energy from the mains is first transformed into magnetic
energy and then back into electrical energy. The battery stores the electrical energy
in the form of chemical energy. During discharge of the battery, chemical energy is
converted back into electrical energy.