Batteries store energy and so do capacitors. However, the principles are much different, and batteries can store much more energy.
Batteries actually store chemical energy.
In a capacitor, the energy comes from the fact that the stored charge on one plate repels like charge on the same plate and attracts unlike charge on the other. When an external circuit is provided, the charge flows from one plate to the other, each tending to neutralize the other. If half the charge becomes neutralized, the voltage is half of its starting value. There are many ways to make capacitors, but the important considerations are the surface area of the plates and the distance between them. Overall, the energy that can be stored in a capacitor depends mainly upon the overall volume of the capacitor.