The number of sunspots reaches a maximum about every 11 years, but successive maxima have spots with reversed magnetic polarity. Thus the whole cycle is 22 years long.
The record of observations indicates that this cycle has been going on back to the early 1700's, although the strength of the cycle varies. For the period 1645 to 1715 the record is rather spotty, but suggests that there were hardly any sunspots.
The luminosity of the Sun increases a little when there are sunspots. During the period 1645 to 1715 the Earth was unusually cold. (The original source for this data is the 1998 SolPhys article by Hoyt and Schatten, "A new construction of Sunspot Numbers." My thanks to Oran White for this information.)
There is a model for how this works. The model makes use of the observation
that the upper layers of the Sun rotate faster near the Sun's equator than
near its poles. The idea is that the magnetic field gets concentrated along
long lines underneath the photosphere and that these likes get stretched out
by the differential rotation.
If the field comes out of the photosphere, that makes a pair of sunspots.
An analysis of this model in its details is enormously difficult. But we can ask a few critical questions:
Davison E. Soper, Institute of Theoretical Science, University of Oregon, Eugene OR 97403 USA soper@physics.uoregon.edu