A capacitor is a little bit like a battery in that both store electrical energy. But how they work is completely different. A capacitor is also much simpler than a battery, as it can only store electrons, not produce them.