An alternator converts mechanical energy (from rotation) into electrical energy via electromagnetic induction. This is the core of most of our electrical power plants, and is how all electricity is generated except in electrochemical systems (batteries, photovoltaic cells…).
The process can be monophasic (as with a single dynamo) or triphasic (as in power plants).