At present, there are different kinds of batteries on the market. The lifespan of a battery is measured in full charge and discharge rounds.
Lithium batteries on electric cars partially suffer from the “memory effect” and ensure 2000 full charge and discharge rounds. This means that you can drive for 200.000km.
Moreover, after this period, the battery can still be used: it has just reduced its ability to store energy. You will have a more and more reduced capacity, but you will still be able to drive for thousands of km.
The electronic battery management system (BMS) will be able to take these changes into account and to handle the charging process, according to the battery condition.