Quite a large amount of the heat from the Sun's core is moved up towards the surface by 'convection' - hot material rising to the top of colder matter. But in regions where there is a strong magnetic field, the convection is stopped, so not so much heat reaches the surface. Seen against this very bright background, the cooler area appears darker.
Sunspots form in pairs - one at each end of the magnetic loop, and usually last for a few days.
Occasionally larger groups can form, which persist for weeks. A close up of sunspots.