Batteries are considered consumable components - that is over time their ability to hold a charge diminishes. It can also fail to supply enough power at peak load, causing problems with your device shutting off when you need it the most.
The Battery Health Overview
Since iOS 12 we now get a very helpful overview of battery health (Go to Settings>Battery). Here it tells you what has been using the most power over the last 24 hours and 10 days to help you identify problem applications or power drains. You can also find the Low Power Mode toggle which temporarily disables OS wide power draws such as animations to eek out the battery life when you have little remaining charge.
Battery Health
Going one step further and selecting Battery Health (Settings>Battery>Battery Health) will also tell you what percentage of your Full Charge Capacity (FCC) your battery is achieving. Full Charge Capacity is the rated duration of the battery when new, so a FCC of 90% would indicate that when fully charged it will last as long as 90% of the original battery life.
It will also indicate if Peak Performance Management has been enabled. Peak Performance Management is a state that is automatically enabled when the battery can no longer sustain the required power at peak load. When it is enabled it throttles the speed, therefore dropping the required power making sure that the unit doesn't power itself off. If Peak Performance Management has been enabled you can choose to disable it to make sure that your device runs at the top speed possible, but you do so at the risk of your phone turning itself off whilst you are using it.
Optimised Battery Charging
Newer iPhones have an option for Optimised Battery Charging that appears at the bottom of the Battery Health page if it's supported. Optimised Battery Charging aims to improve the life of the battery by monitoring and learning from your charging routine. It will then use this information to only fully charge the unit just before you need it, therefore you won't be shortening the batteries life by always having it plugged into a charger.