An X-class solar flare — the biggest class of solar flare — has erupted from the sun straight towards Earth, and geomagnetic storms are on the way.