how can a capacitor be used as a battery
If you have a capacitor, it has a capacitance (C) and a voltage rating. TO calculate the energy that is in the capacitor at a certain voltage you do E = C*(V^2)/2 (Joule, or WattSeconds).
If you have for example a 10.000µF capacitor charged to 5V, and you can use the energy to light some LED's until the voltage is 2.5V, you use an energy of
10000e-6*(5*5/2 - 2.5*2.5/2) = 0.09J.
If your LED has 2V with a current of 20mA (and assuming a losless driver), it takes 2*0.02 = 0.04Watt.
This means that the LED will light for 0.09/0.04 = 2.25 seconds. Not very much...
Do this with a supercap of 10Farad, you will end up with more than half an hour!
Do this with 2 2600mAH AA batteries, and you have light for some days!
That's why for serious energy storage supercaps are used. It is not only used in memory backup (low power, but long period). The supercaps are also used in traction applications, for example dynamic braking of electric vehicles. It is much better for the batteries if the short (but high) energy pulse is stored in the capacitors, instead of charging the batteries.