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 advanced electronic system of your choice. 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 free 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 for stored energy and release that in a controlled method with the starter motor. That storage is usually done in a chemical form in a battery, which is just like reservoir, and being topped up by an alternator or generator when driven by the main engine. In most light aircraft it is usually a 12 volt system, 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 and four times the amount of power in the same wiring without any problems. More about this in our article which electrical system to choose.
Rechargable batteries are usually the lead acid type (Flooded or AGM) or NiCAD (Nickel Cadmium) battery, but lately more and more Lithium types are being used too. Like 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. Also, 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 and voltage limiting and temperature sensors as the battery can get warm during recharge and a thermal runaway must be prevented.
Lithium chemistry 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 CC-CV profile. Which is charging with a constant current (slowly rising voltage) followed by a top off with a constant voltage where the current drops off. 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 such an anomaly, early 2013.
There are several lithium battery technologies available, these are not new as some people might 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, CC-CV) and voltages ranging from 3.3 to 3.7 V per cell and this depends on the chemistry which is used. More on the Wikipedia page about Lithium batteries.
There could be a potential safety problem with storage of so much energy in a huge lithium battery (like in EVs). 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 and practically impossible to put out), 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, separated by a very thin dielectric, 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. A number of electric cars (and electric aircraft too) have already been destroyed just because of this, sometimes with deadly results.