An alternator is a device that generates electrical power in a vehicle's charging system. It converts mechanical energy from the engine into electrical energy to recharge the battery and provide power to the vehicle's electrical system while it's running.