Current produces a magnetic field
A current in a conducting wire produces a magnetic field around it. Near a straight wire, the field lines form concentric circles centred on the wire. A small compass can demonstrate the effect: switch a controlled current on and observe the needle turn. With the current off, the wire contributes no current-produced field, although Earth’s field is still present. Use a suitable low-voltage supply and current control to prevent overheating.