I once saw a picture of the Sun covered with dark spots. What causes sunspots?
The Sun has a magnetic field. This magnetic field is trapped inside plasmas, which is what we call hot regions of ionized matter. These magnetic fields are then twisted end over end in the convective regions near the Sun’s surface. These twisted regions of high magnetic activity are called sunspots because parts of them are cooler than the surrounding regions (they’re still plenty bright, just darker than the rest). The twisted magnetic fields can also break like rubber bands, dumping their energy into the surrounding gas. Such heated gas is called a solar flare.