In the classical theory of stellar evolution, magnetic fields are not needed to
explain the long term evolution of stars. However, things become very different when
one takes into account more "Human-like" times scales, i.e. from years to millennia.
Stellar magnetic fields actively evolve in these short times scales and this has important
consequences for the possible companion planets. This is certainly the case for the Earth
but also applies to the large set of exoplanets that are being presently discovered.
In this talk I'll present what we are learning about the solar magnetic field based
on state-of-the-art MHD numerical simulations. I'll show our latest results about
how the magnetic fields evolves on short time scales (years and decades) and how
it can influence the whole solar convection zone: from small scale turbulence to
large scale structures (e.g. differential rotation). Afterwards, it time permits, I'll show
how the solar magnetic field impacts the Earth by presenting a reconstruction of the
field intensity at 1 AU for the last 250 years and the several ways it has been obtained.