The battery works on the basic principle of flow from electrons from the negative post to the positive post.
Types:
Lead-acid batteries were invented in 1859 and are the oldest form of rechargeable battery still in use. Lead-acid batteries are a kind of wet cell battery and usually contain a mild solution of sulfuric acid in an open container. The name comes from the combination of lead electrodes and acid used to generate electricity in these batteries. The major advantage of lead-acid batteries is that, after having been used for so many years, they are well understood and cheap to produce. However, they do produce dangerous gases while being used and if the battery is overcharged there's a risk of explosion.
Lead–acid battery
Nickel metal hydride batteries came into commercial use in the late 1980s. They have a high energy density -- that is, a great deal of energy can be packed into a relatively small battery -- and don't contain any toxic metals, so they're easy to recycle.
Nickel–metal hydride battery
Lithium-ion batteries, which came into commercial use in the early 1990s, have a very high energy density and are less likely than most batteries to lose their charge when not being used -- a property called self discharge. Because of their light weight and low maintenance requirements, lithium-ion batteries are widely used in electronic devices such as laptop computers. Some experts believe that lithium-ion batteries are about as close as science has yet come to developing a perfect rechargeable battery, and this type of battery is the best candidate for powering the electric cars of the near future. A variation on lithium-ion batteries, called lithium-ion polymer batteries, may also prove valuable to the future of EVs. These batteries may eventually cost less to build than lithium-ion batteries; however, at the present time, lithium-ion polymer batteries are prohibitively expensive.
Lithium-ion battery
Lithium-ion polymer battery