When a charged particle such as an electron, proton or ion is in motion, magnetic lines of force rotate around the particle. Since electrical current moving through a wire consists of electrons in motion, there is a magnetic field around the wire. i hope u have smileing day