The short answer to how the aurora happens is that energetic electrically charged particles (mostly electrons) accelerate along the magnetic field lines into the upper atmosphere, where they collide with gas atoms, causing the atoms to give off light.
Assuming this is an elastic collision, they go in the direction of the object with more mass