why does the sun have spots
The Sun has a magnetic field that gets twisted around inside the Sun as it spins. There are places on the Sun where this magnetic field rises up from below the Sun's surface and pokes through, creating sunspots. Sunspots are magnetic and often have a north and south pole like a magnet.