Difference between battery and capacitor?
Capacitors and (rechargeable) batteries can both be used to store and retrieve electrical energy, and both are used for this purpose. But the way they store electrical energy (charge) is different, which leads to different characteristics and hence different use cases.

A capacitor directly stores charge on what is essentially two plates of conductors. The fact that the charge is stored in conductors makes it readily accessible (low impedance, quick to react to changes), but the fact that its storage is essentially a 2-dimensional pair of plates severely limits the amount of energy that can be stored. (Higher-capacity capacitors use a 2.5-D storage at the expense of much less conducting plates). A capacitor stores charge, which means that when the capacitors discharges (delivers current), its voltage drops (linearly when the current is constant).

A battery stores energy in chemical reactions. This means that energy is stored in a 3D volume, so much more energy can be stored, but as ions don't change their speed as quickly as electrons, a battery can't respond as fast to changes of current as a capacitor. Chemical reactions are never perfectly reversible, so a battery wears out, much quicker than a capacitor. But a chemical reaction has a fixed 'activation voltage', so the voltage of a battery stays (more or less) the same while it is discharged.

Hence batteries and capacitors have different use cases, that seldom overlap. If you need


high capacity => batteries
fixed voltage => batteries
quick response => capacitors
'infinite' (component) lifetime => capacitors


In fact batteries are often too slow for electronics, but capacitors would not be able to store enough energy, so in practice you often want


high capacity + quick response => use batteries + capacitors