An alternator is part of the charging system of your car that produces electricity for many devices. A type of generator, it transforms mechanical energy into electrical energy. Although a car's battery supplies some electricity, most of the electrical mechanisms within the vehicle require the this device's steady stream of power.
Alternating current (rather than direct current) gives the alternator its name, because this is the type of electricity it creates. It's mainly a mechanical device, concealing a pulley, wheels, brushes and wires, which hooks to the crankshaft and runs to the battery. This way, the gasoline powers the engine to turn the crankshaft, which in turn connects to the alternator, which converts that motion into current whenever the car is running. The resulting electricity operates the cooling fan, headlights, windshield wipers, radio, defogger, and air conditioning.
To be more specific, this part is very efficient at producing a constant, high voltage, even when the car is idle, because of how it works. The belt (from the crankshaft) connects to a pulley system, called the rotor, so that when the belt is turning, it moves magnets across a special surface, called a conductor. Moving magnets in the stator generate an electrostatic field, otherwise known as electricity. This alternating current is controlled by a voltage regulator to keep the voltage steady. Another part, called the diodes, convert alternating current into direct current that flows on to the battery and other components.
Even if an alternator dies or malfunctions, the car will run for a while directly off of the battery until all of its power is sapped. This makes it hard to tell when the device is having problems. Sometimes, a harsh noise or intermittent headlights will give it away. Drivers should check to make sure the belts are not cracked, or improperly tightened, before replacing the entire part. A rebuilt alternator can be a reliable, but less expensive, option if it must be repaired.