Aurora Borealis as seen from Space. Photo: NASA Earth Observatory/Flickr
On October 4 and 5, a coronal mass ejection from the sun sent an explosion of particles speeding toward earth. Three days later, those particles hit the earth's magnetic field. The magnetic field funneled the particles into the atmosphere near the poles, where they collided with gases in the upper atmosphere to release dramatic waves of colorful light over Canada's Quebec and Ontario provinces. You don't get to see the green and purple colors in the photo above—taken early on the morning of October 8, 2012, by a NASA satellite—but you do get a pretty good idea for the size and scope of the massive swell of light.
For a visual explanation how an explosion on the sun can lead to northern lights, watch the video below from Per Byhring.