When electricity passes through insulated copper wire it developes a magnetic field around it. Larger the amount of electricity stronger the magnetic field. And when we place compass needle in the radius of the magnetic field it diverts from its north-south position. this is magnetic effect of electric current