The magnetic effect is exactly the same in a
copper wire and a coil wire. When a current
passes through a wire, the current induces a
magnetic field around the wire. The magnetic
field has a certain direction associated with it.
In the case of the current-carrying wire, the
direction of the magnetic field happens to be
tangentially to an imaginary circle drawn around
When the wire is twisted into a geometry of the
coil, the magnetic fields induced by each "turn"
of the coil either add up or subtract out because
of the direction of the magnetic field from
different turns are different in some regions and
the same in some other regions. It turns out
that the magnetic field due to a current-carrying
coil of wire looks like the magnetic field due to
a bar magnet with north and south poles.