Something like battery is a capacitor, in a kind of a way. Though they work in different ways, completely, capacitors as well as batteries are both of which are devices that are used to store electrical energy.If one has read up on how batteries work, one would surely know that a battery has two terminals. Inside of the the battery, the chemical reactions produces electrons, and they are formed on one terminal, then they absorbed on another.
Much simpler than a battery, however, is a capacitor, this is because it cannot produce new electrons.
Link: HowStuffWorks