Alex: When a coronal mass ejection or a CME slams into the Earth's magnetosphere or magnetic field it causes it to move bank and forth or oscillate and this creates electromagnetic currents in the upper atmosphere. These together are what we call a geomagnetic storm.