An alternator is a generator which converts mechanical energy to electrical energy in the form of alternating current. There is one in every car, with the exception of older cars that use a DC generator.
Most alternators use a rotating magnetic field with a stationary armature. The armature reacts to the rotating field and carries the current caused by the rotation.