The battery on your car is used to start the engine, and run all the electrical components within it - lights, wipers, stereo, etc.
If the battery wasn't charged up, it would run out of power pretty quickly, and you'd find yourself with a car that simply wouldn't start. This is where the alternator comes in!
In simple terms an alternator is a belt-driven generator. The belt, which is driven by the engine spins the alternator' which produces electricity. This electricity is stored in the battery, and it's constantly 'topped up' by the alternator as you drive along.
You'll find the alternator bolted to the side of the engine, it's usually a large cylindrical component, with a fan (used for cooling) at one end.
The fan-end of the alternator will be connected to the drive-belt, which is driven by the rotation of the engine. As the belt spins the alternator generates electricity.
Within the alternator you'll find the 'stator' which is a set of coil windings (peer through the end of the alternator and you'll see these shiny copper wires. Inside the stator there is an electromagnet connected to the main rotor shaft.
As the rotor spins within the stator the electromagnet creates electricity. This is then transmitted through carbon, or copper carbon brushes (contacts).
A regulator mounted to the rear of the alternator controls the output of electricity in relation to the demand (a low battery will need more voltage than one that simply needs to be kept topped up.)
Without a regulator the battery would be overcharged, causing it to overheat and potentially be damaged in the process.
On some alternators, particularly on newer cars, the regulator operates as a simple on-off switch and the actual output is controlled by the engine's ECU, or PCM (power control module). These are more capable of accurately meeting the batteries needs, and as a result are more efficient.
Accessing the alternator is generally simple on older vehicles, but on newer cars where the engine bays are more tightly packed, it may well be buried deep within a host of other components.
Locate it by finding the drive belt (sometimes called a serpentine belt) which is also likely to be connected to the crankshaft (the big pulley at the bottom of the engine), power steering pump, and water pump.