The movement of so much plasma in the Sun combined with its rotation can cause the Sun's magnetic field to distort and affect the movement of material in the photosphere.
Sunspots are temporary phenomena on the Sun's photosphere where intense magnetic activity can inhibit convection. This causes a darker, cooler spot on the surface as hot material is prevented from rising up.
The magnetic field line near sunspots often tangle and reorganize, causing explosions of energy associated with secondary phenomena such as solar flares, solar prominences, and coronal mass ejections. These add to the material constantly streaming from the Sun (the solar wind) sometimes disrupting the Earth's own magnetic field.