Alternators convert mechanical energy from the engine into electrical energy to power the vehicle's electrical system and charge the battery. They consist of a rotor, stator, and voltage regulator, which work together to produce electrical energy that is used to power the vehicle's electrical components and charge the battery.