The Sun is a like a huge magnet. It has long, invisible magnetic field lines that run between its north and south poles. Because the Sun is made completely of gas, it rotates in a weird way that makes its field lines behave much differently from those on Earth. This is what happens: The Sun rotates faster at its equator than at its. This makes the magnetic field lines wrap around the Sun. The lines that cross the faster-moving equator are dragged ahead of the lines nearer the slower-moving poles.
At the same time, the lines rise and fall along with the currents of hot gas in the Sun and are twisted into magnetic rubber bands. All this stretching and twisting strengthens the magnetic field. The twisted lines rise to the surface, where they form sunspots and release energy as prominences and other eruptions.
Prominences occur when a loop of the Sun's magnetic field bursts into space, carrying hot gases with it. They can travel at speeds of up to 1330 km (830 mi.) per second.
Sunspots are areas of cooler, darker gas on the Sun's surface. They range in width from a few hundred kilometers to 80,000 km (50,000 mi.)- about six times the Earth's diameter. They often appear in pairs, one at each place where a loop of magnetic field protrudes from the Sun's surface. Sunspots can last for months or disappear after a day or two. The number of sunspots goes up and down in an eleven year cycle. At the beginning of the cycle, known as the sunspot minimum, the Sun has almost no sunspots at all. By the sunspot maximum, the Sun has dozens of sunspots. The Sun's magnetic fields weaken eventually, causing activity on the surface to quiet down. Then, the process begins again and magnetic activity slowly rebuilds.