The phenomenon of magnetic fields around the current was discovered by the Danish physicist Oersted. Oersted showed students that as the current flows, the wires become hot. Then he was surprised to see that the compass's spine on the side of the wire was spinning.
Oersted experimented with this phenomenon several times, and found that there is a close relationship between electrical and magnetic phenomena. Since the discovery of Oersted, research into the interaction of electricity and magnetism has been vigorous.