Sunspots are areas where the Sun's magnetic field is high. The magnetic field keeps some of the heat from below from reaching the surface at these locations. This, in turn, makes them a bit cooler and darker. They are actually pretty bright, but they look dark compared to the rest of the Sun's surface.
cheers,
Terry