A generator converts mechanical energy into electrical energy through electromagnetic induction. When a conductor (wire coil) is rotated within a magnetic field, it induces an electric current. This principle, discovered by Faraday, is the foundation of all electrical power generation.