When current flows through a wire conductor, a magnetic field is created around a conductor.

In 1819 Hans Christian Oersted, a Danish physicist, found that a definite relation exists between magnetism and electricity. He discovered that an electric current is accompanied by certain magnetic effects and that these effects obey definite laws. If a compass is placed in the vicinity of a current carrying conductor, thus indicating the presence of a magnetic force. The direction of the force is assumed to be the direction the north pole of the compass points. These deflections show that a magnetic field exists in circular form around the conductor.