An electric current always makes a magnetic field around it.
A current-carrying wire in a magnetic field feels a force.
A coil in a magnetic field carries a current, so each side feels a force. The forces act in opposite directions and turn the coil.
Moving a magnet near a coil induces an e.m.f. (a voltage) across the coil.
A generator turns a coil between magnets to induce an alternating voltage.
A changing current in the primary coil induces a voltage in the secondary coil on the same iron core.