An interactive magnet and coil load here. It needs JavaScript; the sections below explain everything it shows.
Every wire carrying current has a magnetic field round it. Wind the wire into a coil and the fields add up along the middle. Put an iron core inside and the field becomes far stronger, because iron carries magnetic flux far more easily than air. That is an electromagnet: switch the current off and most of its magnetism goes.
The amount of field is the flux, Φ, measured in webers. More current or more turns gives more flux.
Put a wire carrying current across a magnetic field and it is pushed sideways. This is how every motor turns. Fleming's left-hand rule gives the direction: hold the thumb, first and second fingers of the left hand at right angles, point the first finger along the Field and the second along the Current, and the thumb shows the Motion.
Move a wire through a magnetic field, or change the field through a coil, and a voltage is induced in it. This is Faraday's law: the voltage is in proportion to how fast the flux through the coil changes. A steady field, however strong, induces nothing; it has to change.
Example: the flux through a 200-turn coil rises by 50 µWb in 0.1 s. The emf is 200 × 0.00005 ÷ 0.1 = 0.1 V while it changes, and nothing once it stops. Move the magnet twice as fast and the same change happens in half the time, so the emf doubles; wind twice the turns and it doubles again.
For a generator, Fleming's right-hand rule gives the direction of the induced current, with the same fingers as before.
Lenz's law gives the rest: the induced current always flows so as to oppose the change that made it. That is why it takes more force to turn a generator as you take more current from it.
When the current in a coil changes, its own changing field induces a voltage in it that opposes the change. So a coil slows down any rise of current, and when the current is suddenly broken it tries to keep it flowing, with a high voltage across the opening contacts. That is the spark you see when a contactor drops out an inductive load, and the reason relay coils often have a diode or suppressor across them.
Put two coils on the same iron core. A changing current in the first makes a changing flux in the core, and that induces a voltage in the second, with no wire between them. That is how a transformer works, and why it only works on AC: DC gives a steady flux, which induces nothing.