Lithium-ion batteries tend to swell when they've exceeded their normal use/lifespan... Just follow Apple's recommended practices for battery charging and you'll likely get a new phone because of new features, etc. before the battery fails.
The swelling is caused by off gassing when the internal components start to break down. Basically the battery is like a layer cake. Very thing layers wrapped around each other. Over time these layers tend to break down and a chemical reaction happens that produces gas. The batteries are sealed so they start to bloat.
Excessive heat will speed the process up. So normal charging shouldnt, but if your driving using navigation and its charging and the phone gets hot, well that right there over time and especially if its repeated often will cause this to speed up a lot.