How do batteries work?
Electricity, as you probably already know, is the flow of electrons through a conductive path like a wire. This path is called a circuit.
Batteries have three parts, an anode (-), a cathode (+), and the electrolyte. The cathode and anode (the positive and negative sides at either end of a traditional battery) are hooked up to an electrical circuit.
The chemical reactions in the battery causes a build up of electrons at the anode. This results in an electrical difference between the anode and the cathode. You can think of this difference as an unstable build-up of the electrons. The electrons wants to rearrange themselves to get rid of this difference. But they do this in a certain way. Electrons repel each other and try to go to a place with fewer electrons.
In a battery, the only place to go is to the cathode. But, the electrolyte keeps the electrons from going straight from the anode to the cathode within the battery. When the circuit is closed (a wire connects the cathode and the anode) the electrons will be able to get to the cathode. In the picture above, the electrons go through the wire, lighting the light bulb along the way. This is one way of describing how electrical potential causes electrons to flow through the circuit.
However, these electrochemical processes change the chemicals in anode and cathode to make them stop supplying electrons. So there is a limited amount of power available in a battery.
When you recharge a battery, you change the direction of the flow of electrons using another power source, such as solar panels. The electrochemical processes happen in reverse, and the anode and cathode are restored to their original state and can again provide full power.