Hi
Sunspots form when a tube of strong magnetic field floats up through the outer layer of the Sun and breaks through the surface, forming a hugh loop of magnetic field. Sunspots come in pairs -- althought the two spots might look quite different - because the magnetic loop comes up in one spot and back down into the Sun in another. The tube of magnetic field is generated inside the Sun. Solar physicists only barely understand the whole process and are workoing hard to learn more about it.
Paulett