How does a generator produce electricity?

A constantly changing magnetic field induces an electric current.
Current is supplied to a solenoid, which creates a magnetic field.
The motion of a conductor in a magnetic field induces an electric current.
Moving magnetic fields induce an electric current in slip rings.

The correct answer is: The motion of a conductor in a magnetic field induces an electric current.

A generator converts mechanical energy into electrical energy by using a rotating magnet inside a stationary conductor. When the magnet rotates, it creates a changing magnetic field, which passes through the stationary conductor. This induces an electrical current to flow in the conductor, generating an output of electrical energy. The electrical energy produced by a generator can be used to power machines, homes, and other devices.