A genarator is a device that can convert mechanical energy to electrucal enery.
Inside a genarator, conductor continuously cut through a static magnetic field, thus producing induced voltage in the conductor. This induced voltage is stored and distributed to electricity consumer