That's because magnetic fields reduce the pressure exerted on the gases inside of them, making the spots cooler than the rest of the Sun's surface.
⇑ Translate the sentence above by Google ⇑
Related: magnetic