The battery is a storage device, currently 12 volts, used to start the engine and help operate the electrical accessories installed on your car. The battery consists of six cells of stacked positive and negative lead plates, separated by insulators and immersed in electrolyte, which is a water and sulfuric acid mixture. Each of the six cells "produces" 2.1 volts for a total of 12.6 volts (although it's actually stored energy, not produced).
The chemical reaction created between the lead plates and the electrolyte creates dangerous, explosive gases that vent through the battery cover vents. Care should always be taken when charging or jump starting low batteries and whenever working under the hood of the car. Always keep the battery clean to allow proper ventilation.
Some batteries use a gel to replace the electrolyte for a somewhat safer battery and the use of "maintenance-free" batteries has eliminated the need for refilling the electrolyte. However, all batteries lose charging capacity over time through the loss of the electrolyte, deterioration of the plates and chemical breakdown of the connections.
Whenever a car exhibits symptoms of a charging or starting system failure, the most basic test that should be performed first is a visual and voltage test of the battery. Knowing the exact condition of the battery is the best way to know whether or not to suspect other system components and can prevent the unnecessary installation of a starter or alternator, which cannot repair the vehicle until the battery is up to snuff.
Before replacing any battery due to a failure, have the battery and the car's electrical system tested for proper functioning. Replacing a dead battery only to have another a few weeks later due to a weak alternator or a parasitic drain on the system is not only frustrating but can be expensive and dangerous as well.
An average battery should last 3-5 years in average climates but those in high heat or extreme cold areas may last only 2-3 years. The replacement battery should always have the same or higher CCA rating (cold cranking amps) as the original and be of the same or compatible "group size" to fit the battery tray and cable connections