At high-latitude areas (polar areas), the magnetic field is vertical. It does not keep off particles of the solar wind which can come from the magnetosphere and hit the particles of the air (Earth's atmosphere). When they hit, the atmosphere is heated and excited and the excess energy gets away, a phenomenon which we see as moving lights in the sky above 100 km altitude typically. An aurora can be especially bright following a solar flare and coronal mass ejection (CME), when the charged particles rip through the electromagnetic field because of their power.