Sunspots are magnetic in nature.
Sunspots are darker than the surrounding areas because they are expending less energy and have a lower temperature. Sunspots are formed continuously as the Sun's magnetic field actively moves through the Sun. The sunspots have lifetimes of days or perhaps one week or a few weeks. Here is one scenario that some scientists think explains how sunspots form. Imagine the magnetic field on the Sun as loops like rubber bands that wrap around the Sun, with one end attached to the south pole and the other end attached to the north pole.