Moving Charges and Magnetic Fields
A magnetic field surrounds an electric current. This is why a compass needle moves when placed near a current-carrying wire. The needle moves because the magnetic field around the wire applies a force to the compass needle. The magnetic field can also be seen with iron fillings.
A magnetic field actually surrounds all moving charged particles. the combined magnetic fields of the flowing charges in a current-carrying wire combine to produce a magnetic field around the wire. IF the current is turned off, the charged particles in the wire stop moving. Because only moving charged particles have a magnetic field, they stop moving when the magnetic field goes away.
The magnetic field around a wire is perpendicular to the current. This is seen a s concentric circles around the wire. If a compass was held parallel to the wire, it would not respond to the magnetic field produced by the wire. The magnetic field is strongest close to the wire. The farther away the wire, the weaker the magnetic field becomes.