Lithium-ion batteries aren't infinitely powerful: Like everything on this planet, they age, and as they do so they become less effective.
You can check your battery's general health at any time by going to Settings > Battery. If your battery is running into issues, you'll see an alert at the top of the screen to consider a replacement.
iPhone 6 | iPhone SE | iPhone 6 S | iPhone 7 | iPhone 7 Plus |
iPhone 8 | iPhone 8 Plus | iPhone X
The company will begin the program worldwide in late January 2018.