The battery's purpose is to store electrical energy. Voltage is supplied by the alternator to the battery and the battery absorbs it until it is full and can't absorb anymore. It is a chemical process and works in reverse when the car is off.
Traditionally batteries consist of a sealed box of 6 separate cells. Each cell has two plates and an electrolyte, usually a strong solution of acid. Each cell produces nearly 2 volts and when placed in series they add up to 12 volts.
Batteries can vary. Batteries can come in different styles and incorporate different technologies. They may be traditional, with flat plates and separators, or have round plate technology. No matter the style or technology found in the battery, all batteries perform the same purpose - store and deliver electricity when needed.