Extreme heat and cold can affect the chemical process used to generate a charge. A battery that is exposed to such extremes--especially one that lacks an insulated jacket--will wear out in a short amount of time.
If you take numerous short trips of less than 20 minutes, the battery doesn't have time to fully charge and its lifespan will shorten.
Dirt on the battery's connections interferes with its function. Clean the connections with a mixture of two tbsp. of baking soda to one pint of mineral-free water and a clean rag.
Corrosion on the terminals shortens the battery's life. You can apply terminal protector spray to the terminals twice a year to keep corrosion at bay.
The headlights, radio and other electrical functions of your vehicle use the battery for their power. If you use them indiscriminately, they will drain power from the battery. To prevent any power drains, don't operate any of those items when the car isn't running.
Most car batteries have an average lifespan of three to five years. Depending on how it is used, you can shorten the lifespan of a car battery if you aren't careful or increase its lifespan through care and use.