Batteries are used everywhere because these devices are able to store electrical energy which is then released once they are connected to a closed circuit. The batteries have 2 sides, the positive Cathode and negative Anode. Although any device that stores energy is typically called "battery", there is a distinction between a battery and a cell: the "cell" is the single unit that is able to store energy while a "battery" is a group of several cells. In this intro they are simply called "batteries" although this distinction is important for electronics projects because cells have typically less energy, less weight and they are cheaper, so they can be suitable for specific projects.
The batteries typically used by most of the people, and they are required by most of the commercial devices, are called "Primary" because they can be used once and then discarted (i.e. they cannot be recharged) while the "Secondary" batteries are the ones that can be recharged. Figure 1 shows different standard batteries typically used in commercial devices, where the the AA and the AAA are the most common. Having standard batteries is really helpful for the users which should simply know which type of battery the device requires and how many.
These batteries differ in size, voltage and mAh (i.e. the capacity of the battery, which is the mA that the battery is able to provide in 1h before discharge):
These are simply guidelines because depending on the chemistry of the battery the voltage and the capacity might vary: for example for the Primary batteries two of the most common types are the Alkaline and Zinc-Carbon, the former are the most popular and have an higher energy density so they last longer but are more expansive than the latter. Make sure to read the voltage, the capacity and the size of the specific battery you are interested.
In electronics typically the preference goes towards the Secondary batteries: these initially cost more than the non-rechargable ones but in the long-term they cost less given that they can be reused multiple times. These wildly vary in sizes, shapes, voltage, capacity, cost so it is possible to choose the one more suitable for the specific project. The most common batteries, and typically cheapest option, are the Lead-Acid batteries. These are really popular especially in automotive industry, easy to recharge but quite heavy in comparison to the other options: if weight is not an issue these batteries provide good performance for very good price. Figure 2 shows an example of a 12V Lead-Acid battery.
Another common battery type is the Nickel-Cadimum (NiCd) battery. These are more costly than the Lead-Acid batteries because they provide better performance given the same amount of weight (i.e. so they weight less given similar performance), one of the issues with these battery is the so-called "memory effect" where the battery, in case not fully discharged for several times, "remembers" this partially discharged level and does not fully charge anymore. This affects the capacity of the battery although there are ways to reset the battery if not damaged. Figure 3 shows an example of 1.2V NiCd batteries.
The Nickel–Metal Hydride batteries (NiMh) are similar to the NiCd but with better performance, due to the higher energy density, and also have reduced or negligible "memory effect". However, they are more expensive and also they have an higher self-discharge: batteries gradually discharge also when they are not used and in case of the NiMh the rate of this effect is typically higher than NiCd. Figure 4 shows an example of 1.2V NiMh batteries.
Finally, the most used and well-known type of battery in modern technology is the Lithium battery. These have the highest energy density, so they are very light and this improves the portability. For this reason, they are used in many portable devices like smartphones, laptops, drones and so on. However, this is reflected in the cost of these batteries and also they have some issues like the tendency to overheat and the requirement of limiting the voltage to avoid damaging the battery. The two most common types of Lithium batteries are Li-Ion (Lithium Ion) and Li-Po (Lithium Polymer), the differences between the two are mostly in energy density (the Li-Ion is better), versatility (the Li-Po is typically made of gel-like electrolyte and this allows them to be moulded into different shapes), in cost (Li-Ion is cheaper), safety (Li-Po has lower chance of leaking electrolyte, for completeness an electrolyte is the chemical medium used in the battery which allows the current flow between cathode and anode). Figure 5 shows an example of these two types of Lithium batteries.
Figure 6 shows the typical symbols used for the batteries in schematics. The top symbol is typically used for a cell (although it can also be used to simply stating that a battery component is used) while the bottom symbol is more specific because it can highlight the number of cells that are part of the battery (by simply including more cell symbols in series).
In conclusion, the best battery does not exist. Every battery has advantages and disadvantages and one of the main tasks when designing a circuit is to understand which is the most suitable battery and some of the factors to take into consideration are: cost, dimensions, weight, rechargeability, required voltage and current.