Oddly enough, one of the main reasons that a car's battery loses performance is quite simply, corrosion. Yes, I mean rust. No matter how well the internals of the battery work, if there is a considerable amount of corrosion on the terminals, it will interfere with the passage of electricity to the vehicle, and your battery is not going to perform adequately.
If this happens, you can still bring your battery up to full power.
Did you know that wetting the corroded areas with a little cola can actually eat away the corrosion and get the terminals functional again? There is another way to clean the corrosion off the terminals, and that is to mix three volumes of baking soda in one volume of water, and then to add this mixture to the corroded areas.
It will have exactly the same effect as the cola, that is to say, the corrosion will be eaten away.
Once this is done, you can use an old (but clean) rag to clean the terminals of any residue or of any moisture that still remains. Once the terminals are completely dry, you can cover them with petroleum jelly. Doing this will prevent corrosion in future, and allow the terminals to function optimally. However, if you have bought a new battery recently, I would highly recommend covering every area of the battery that can be corroded with petroleum jelly to start with, as this will prevent corrosion from taking hold in the first place.
A second important rule to maintaining your car battery is to not put a strain on it when the engine isn't running.
I've seen a lot of people use the radio, for example, or the internal electronics of the car, or even the lights when their engine isn't running. While the car battery will power these things for a short period of time, you must bear in mind that you are putting your battery to use that it was absolutely not intended for, and this is going to reduce the life of your battery and to damage it.
You must understand that your car battery is in your car for one primary reason, and this is to power the ignition of the engine.
Yes, in the old days, people used to hand-crank their cars to start them. Your battery is there to ensure that you don't have to do this, and for no other purpose. When your car is running and you use the lights and the radio, it is actually your car's engine, and not your battery, that is taking the load.
Not using your battery for these purposes when the engine isn't running will massively extend the life of your battery.
One final, but rather important thing that you can do to extend the life of your battery, is to make sure that it is well secured inside the car.
Vibration can cause severe damage to the battery, and massively reduce its lifespan, if not end in destroying the battery altogether. So make sure that your battery isn't subject to excessive vibration while your car is in motion.