The variability of magnetic activity in solar-type stars