Most electric cars have a lithium-ion (li-ion) battery pack which provides the driving power for the motor. Li-ion technology is used in computers and smartphones so is well proven. Power for heating and the A/C also comes from the main drive battery.
Most EV manufacturers take lots of small individual batteries and install them into larger module packs. These are distributed under the floor which releases passenger & luggage space and also keeps the centre of gravity low.
Unlike your smartphone, the electric battery in a car has a sophisticated charge/discharge control system which prevents it from discharging completely and also means it will last much much longer. However there are some recommendations which will help keep the battery in a good state of health, such as not leaving it to sit at either 100% charged or fully discharged.
The cost of li-ion batteries has fallen dramatically in the last few years – an 85% reduction from 2010 to 2018*, which means the cost of the battery as a proportion of the total car cost has reduced. By 2025, the battery will be only 20% of total vehicle cost, compared to 33% in 2019.
*Source: Bloomberg NEF
An EV also has a standard small 12V lead-acid battery similar to that in a petrol/gas or diesel car. This works in exactly the same way as those cars, powering such items as wipers, music system and lights.