The sun goes through cycles lasting approximately 11 years that include phases with increased magnetic activity, more sunspots, and more solar flares, and phases with less activity.
Image Courtesy of NOAA