We review the possible mechanisms for the generation of cosmological magnetic fields, discuss their evolution in an expanding Universe filled with the cosmic plasma and provide a critical review of the literature on the subject. We put special emphasis on the prospects for observational tests of the proposed cosmological magnetogenesis scenarios using radio and gamma-ray astronomy and ultra-high-energy cosmic rays. We argue that primordial magnetic fields are observationally testable. They lead to magnetic fields in the intergalactic medium with magnetic field strength and correlation length in a well defined range. We also state the unsolved questions in this fascinating open problem of cosmology and propose future observations to address them. © 2013 Springer-Verlag Berlin Heidelberg.