Most aircraft require some form of electrical power to operate navigation-, taxi-, landing-, strobe lights, one or more COM and NAV radio's, transponder, intercom and other electronic systems. The electrical system consist of a battery and an alternator or generator on older aircraft. All of this is connected through several meters (kilometers in large aircraft) of wire.
All matter on earth is made up from molecules and they basically consist of atoms. These atoms are made of electrons, protons and neutrons. And electricity is about the flow of electrons attracted to protons and repelled by other electrons.
Alternators and generators generate a flow of electrons for us to make use of, but these items do nothing if the engine is not operating. To get them going we need some form of storage to be able to start up our engine so that electrical power can be generated.
And as alternating current is impossible to store, we will discuss direct current combined with the basic secondary battery. As this model can be recharged in contrary to the primary battery.
For an aircraft engine to be able to start (ie. not by handpropping) there is a need to store energy and release that in a controlled method. That is usually done in a chemical form in the battery, just like reservoir, and being topped up by an alternator or generator when driven by the engine. In light aircraft it is usually a 12 volt type, as in a normal car.
More sophisticated aircraft use a 28 volt system because they need more electrical power (for starting turboprops or turbines) without the need for using a larger and heavier 12 volt battery and thicker wires. With a 28 volt system you can carry twice the amount of amps in the same wire without any problems. More about this in our article which electrical system to choose.
Rechargable batteries used to be the lead acid type (Flooded or AGM) or NiCAD (Nickel Cadmium) battery, but lately more and more Lithium types are being used too. As in a car, the flooded lead acid battery also generates hydrogen (very explosive) during charging and this needs to be vented overboard to prevent any accidental explosion. The acid in the battery is very corrosive. Hence the use of NiCADs or Lithium in larger aircraft which do not have these disadvantages. But these need current limiting and temperature sensors as the battery can get warm during recharge and a thermal runaway must be prevented.
Lithium type batteries can also be used but they must be charged so that each cell receives the same amount of energy up to their capacity. This is called balanced charging and it uses a dedicated profile CCCV, which is charging with a constant current followed by a constant voltage. They also need protection against rapid discharge (short circuit) as some chemistries can heat up very quickly causing a fire hazard or even an explosion. The Boeing 787 Dreamliner suffered from this anomaly, early 2013.
There are several Lithium battery technologies available, these are not new as some people think but have been around since the 1970's at least: Cobalt (Li-Co), Ion (Li-Ion), Polymer (Li-Po) and Iron Phosphate (LiFePO4). Each type has their own load and discharge characteristics (constant current and constant voltage, CCCV) and voltages ranging from 3.3 to 3.7 V per cell and it depends on the chemistry which is used. More on the Wikipedia page about Lithium batteries.
The amount of energy per volume or weight is called energy density and for batteries it is quite low compared to liquid fuel. More to be seen at the Wikipedia page on energy density.
There could be a potential safety problem with storage of so much energy in a lithium battery. For example: suppose you need to store 1 GW for a day (which is not unusual within the energy supply industry) and this totals to: 1.000.000.000 x 86400 seconds = 8.6 x 10^13 joules = 86 TJ.
Which is a wee bit more than the nuclear bom on Hiroshima (Little Boy, 67 TJ or 16 kT).
Thus, if such a battery ever experienced a sudden catastrophic dielectric failure due to a mechanical issue or if the batteries overheated and exploded, the resulting energy release would be the same as a 16 kiloton explosion. Liquid fuel is dangerous too, but compared to what could happen in a battery disaster (internal thermal runaway), they seem like the safest option as fluids easily pour away.
The difference here is that the battery contains the fuel and oxidizer in one dense package where the fuel tank only contains the fuel. Should anything happen to the battery, a puncture during an accident is not unlikely, the resulting fire and explosion are next to impossible to prevent. Some electric cars have been destroyed just because of this.