The batteries used to power iPhones are based on lithium-ion chemistry which is a relatively newer technology as compared to the other types of batteries currently available in the market.
These batteries not only charge faster and last longer but are also characterized by a longer lifespan and higher efficiency. Moreover, lithium-ion batteries have a high energy density which means that they can house a greater battery life while minimizing the battery size – essentially paving the way towards thinner and smarter designs.
You should bear in mind that battery capacity and performance degrades over time, so you may have to charge it more often and for longer periods.
Nonetheless, lithium-ion batteries have an edge when it comes to degradation as they have a high number of charge and discharge cycles.
On average, the batteries in iPhones pack around 500 complete cycles before their performance starts getting affected and so the battery can last for at least 2 years before it drops down to 80% of its full capacity.