  Magnetic fields are observed on nearly all scales in the universe, from stars
and galaxies upto galaxy clusters and even beyond. The origin of cosmic
magnetic fields is still an open question, however a large class of models puts
its origin in the very early universe. A magnetic dynamo amplifying an initial
seed magnetic field could explain the present day strength of the galactic
magnetic field. However, it is still an open problem how and when this initial
magnetic field was created. Observations of the cosmic microwave background
(CMB) provide a window to the early universe and might therefore be able to
tell us whether cosmic magnetic fields are of primordial, cosmological origin
and at the same time constrain its parameters. We will give an overview of the
observational evidence of large scale magnetic fields, describe generation
mechanisms of primordial magnetic fields and possible imprints in the CMB.
