iPhones use lithium-ion batteries, and the maximum charging capacity decreases with repeated charging. Normally, the battery will deteriorate after 500 charging cycles, or about one and a half to two years.
*For models from 2011 onwards, after replacement a message will be displayed stating that the part is not genuine, but this will not affect use.