Magnetic fields occur spontaneously both in astrophysics and in the early universe. Their energy sources are rather different: kinetic energy of the plasma in astrophysics and a variety of other forms of energy including axions, scalar fields, and chiral fermions in the cosmological settings. However, both areas have in common that the magnetic field is amplified by a long wavelength instability. In this colloquium, I will survey astrophysical and cosmological magnetic fields and then present a selection of important recent findings.
This talk is also part of the Pencil Code school and user meeting workshop (https://indico.cern.ch/event/1548935)