Generator is a machine, which converts mechanical energy into electrical energy. A generator works on under the principle of faraday’s laws of electro magnetic induction.
It’s essential parts are conductor, magnetic field and the movement of either the conductor or the magnetic field so as to create a rate of change of flux linkage with the conductor by the action of applied mechanical energy.