Magnetic fields are crucial for understanding a number of physical processes in the universe. They give "fluid" like properties to hot and dilute plasma and affect transport properties like thermal conduction, viscosity and resistivity of plasmas. Present day star formation is controlled by magnetic fields with the field possibly determining the typical masses of stars and the initial mass function. They are important for accretion and ejection flows from protostars to active galactic nuclei (AGN). The galactic field is important for cosmic ray confinement and transport. Their most important role for radio astronomers is that they make it possible to "see" objects due to synchrotron and inverse Compton emission of relativistic electrons gyrating in the magnetic field. Indeed it is this radio emission that is crucial to measure the strengths and coherence scales of magnetic fields on the largest scales in the universe, that associated with galaxies and galaxy clusters . Such studies show average total field strengths in nearby spiral galaxies B ~ 10 µG with a mean field about half this value, correlated on scales of several kpc to tens of kpc. Galaxy clusters also seem to host magnetic fields of several µG, and correlated on several kpc scales. How do such ordered large-scale fields arise in galaxies and clusters? Indeed the origin cosmic magnetism in general is one of the fascinating questions of modern astrophysics. It forms one of the key goals of the Square Kilometre Array (SKA). We review here some of the ideas that have been put forth on how the universe got magnetized.
We start with a brief outline of the basics of magnetohydrodynamics, consider then both seed field generation mechanisms and dynamo amplification processes. We consider the possibility of magnetizing the universe through outflows from starbursting galaxies and AGN. We finally discuss the possible role of primordial magnetic fields created perhaps in an early universe phase transition. We focus on magnetic fields on scales larger than galaxies here, as such fields will also be the focus of SKA type telescopes, and do not discuss stellar or planetary magnetism. An extensive review of several aspects of astrophysical magnetic fields and nonlinear dynamos can be found in .