a what is a magnet created when current flows through a wire coil
Either an electric current is passed through the wire of the coil to generate a magnetic field, or conversely an external time-varying magnetic field through the interior of the coil generates an EMF in the conductor. A current through any conductor creates a circular magnetic field around the conductor due to Ampere's law.