A ThinkPad battery can be set up for maximum runtime (hours), or for maximum lifespan before it must be replaced (years). The choice is yours, but with today's battery technologies, you can't have both at the same time.
Whichever optimization you choose, the limitations of today's batteries technologies also mean that they are consumables, i.e. your ThinkPad will last longer than its battery!
Optimizing for runtime (hours)
The normal default Lenovo Power Manager Battery Maintenance setting keeps your battery fully charged. It starts charging when the battery drops below 96%, and stops at 100%. Runtime on battery then depends on the Power Plan settings you choose.
There are several predefined Power Plans which you can tweak to your needs, or you can create your own. For the best runtimes, start with the Maximum Battery Life Power Plan.
Optimizing for lifespan (years)
The main enemies of battery longevity are age, the number of charge cycles, amount of time at full charge, and high temperature.
For maximum lifespan if you rarely use the battery, set Custom charge thresholds to start charging at 40% capacity and stop at 50%, and keep the ThinkPad cool. The thresholds can be adjusted in the Battery Maintenance settings of the Lenovo Power Manager.
If you do use your battery somewhat frequently, set the start threshold at say 85% and stop at 90%. This will still give a good lifespan benefit over keeping it charged to 100%.
The simplest way to optimize for battery lifespan is to select Automatic in the Power Manager Battery Maintenance settings, and let it manage your battery charge thresholds for you.