Consider these fundamental concepts.
1] A static electron produces only electric filed around it.
2] A moving electron produces only magnetic filed.
A current carrying conductor, such as a metal wire, will produce a magnetic field around it because of the motion of charge within the wire itself. This motion produces or sets up a magnetic field around the wire in the form of concentric circles.
This electromagnetic effect is described in physics by the Biot-Savart Law, an experimentally deduced inverse-square law. The effect is also described by Ampère's Law, which is derived from the Biot-Savart Law. This law relates magnetic field and current.
Also, a magnetic field that is set up by an electrical current will produce a magnetic force. This force depends on the rate of charge transfer and the magnetic field