  The success of helioseismology is due to its capability to accurately measure
the p-mode parameters of the solar eigenmode spectrum, which allow us to infer
unique information about the internal structure and dynamics of the Sun. It
also provides insights into the complex solar magnetism. Variations in the mean
strength of the solar magnetic field lead to significant shifts in the
frequencies of even the lowest-degree p modes with high levels of correlation
with surface activity proxies. These frequency shifts are explained to arise
from structural changes in the outer layers of the Sun during the 11-year
activity cycle, which is understood to be driven by a dynamo process. However,
clear differences between p-mode frequencies and surface activity during the
extended minimum of cycle 23 were observed. The origin of the p-mode
variability is thus far from being properly understood and a better
comprehension of its relationship with solar and stellar activity cycles will
help us in our understanding of the dynamo processes. Spectroscopic
measurements of Ca H and K emission lines revealed magnetic activity variations
in a large sample of solar-type stars with timescales ranging from 2.5 and 25
years. This broad range of cycle periods is thought to reflect differences in
the rotational properties and the depths of the surface convection zones with
various masses and ages. However, spectroscopic measurements are only good
proxies of surface magnetic fields. The recent discovery of variations with
magnetic activity in the p-mode frequencies of the solar-like star HD 49933
observed by CoRoT, with a frequency dependence comparable in shape to the one
observed in the Sun, opens a new era in the study of the physical phenomena
involved in the dynamo processes. Current and future asteroseismic observations
will contribute to probe stellar cycles in a wide variety of solar-type stars.
