Two physical principles serve as the basis for the operation of generators and motors. The first is the principle of induction discovered by Faraday in 1831. A driver moves through a magnetic field, or if he is situated in the vicinity of a fixed driving circuit whose intensity can vary, if it induces a current in the driver.
The simplest dynamo-electric machine is the disc dynamo developed by Faraday: it is based on a copper disc mounted so that part of the disc lies between the center and the edge located between the poles of a horseshoe magnet. The magnetic field of a permanent magnet is strong enough to run a single small or motor dynamo.
The opposite principle was observed earlier, in 1820, by Ampère. https://www.mrosupply.com/seals/oil-seals/5073717_471341_timken/ If a current passed through a driver within a magnetic field, it exerted a mechanical force on the driver.
Motors and generators is a group of devices used to convert mechanical energy into electrical, or vice versa, through electromagnetic means. The machine that converts mechanical energy into electrical energy is called a generator, or dynamo, and the machine that converts electrical energy into mechanical energy is called an electric motor.