It is because of the Sun's gravitational pull that Earth orbits the Sun in the manner that it does. In addition, there are two layers of gas above the photosphere called the chromosphere and the corona. Events that occur on the Sun include sunspots, solar flares, solar wind, and solar prominences. Sunspots are magnetic storms on the photosphere that appear as dark areas. Sunspots regularly appear and disappear in eleven-year cycles.
Solar flares are spectacular discharges of magnetic energy from the corona.
These discharges send streams of protons and electrons outward into space. Solar flares can interrupt the communications network here on Earth. Solar winds are the result of gas expansion in the corona. This expansion leads to ion formation. These ions are hurled outward from the corona at over 500 kilometers per second.