These two images were taken one day apart and the spot on the Western limb of the first image has passed around behind on the second image. They are actually about 4800 degrees which is roughly 1000 degrees hotter and brighter than the white-hot filament in an incandescent light bulb. They just happen to be about a thousand degrees cooler than the surrounding surface of the sun and appear dark by comparison. In another frame of reference, if a large sunspot appeared by itself in the night sky, it would appear as a bright red star about 10 times brighter than the full moon. We call machines that can keep the temperature below that of the surroundings, refrigerators.
Sunspots are therefore natural refrigerators on a tremendous scale.
All this is very interesting but does not really answer the question and as near as I can tell, there is no simple answer. Sunspots are clearly the product of extrememly strong magnetic fields and as they usually appear in pairs, one can easily visualize that they are the ends of giant horseshoe magnets. It turns out that each of the two spots of a pair is oppositely polarized so the horseshoe magnet is not all that far fetched. The magnet field is so strong that it prevents energy from flowing horizontally and greatly reduces the flow of energy upward and makes it much cooler than the surrounding region that is free of magnetic fields. I mentioned above that the sun rotates in about 25 days just to keep things simple.