The aurora is caused by the interaction between Earth’s magnetic field and charged particles coming from the sun,
Aurora occurs whenever the charged particles enter the atmosphere and excite the atoms in the air and creats the colors you see. These are noticeable near the poles because at poles the magnetic field lines are denser and dip toward the Earth's surface,