Electricity and magnetism are closely related to each other. The electric current flowing through the wire produces a circular magnetic field outside the wire. The direction (clockwise or counter-clock wise) of this magnetic field is depends on the direction of the electric current.
In the similar way, a changing magnetic field produces an electric current in a wire or conductor. The relationship between electricity and magnetism is called electromagnetism. Hope it helps.