We discuss current observational and theoretical knowledge of magnetic
fields, especially the large-scale structure in the disks and halos o
f spiral galaxies. Among other topics, we consider the enhancement of
global magnetic fields in the interarm regions, magnetic spiral arms,
and representations as superpositions of azimuthal modes, emphasizing
a number of unresolved questions. It is argued that a turbulent hydrom
agnetic dynamo of some kind and an inverse cascade of magnetic energy
gives the most plausible explanation for the regular galactic magnetic
fields. Primordial theory is found to be unsatisfactory, and fields o
f cosmological origin may not even be able to provide a seed field for
a dynamo. Although dynamo theory has its own problems, the general fo
rm of the dynamo equations appears quite robust. Finally, detailed mod
els of magnetic field generation in galaxies, allowing for factors suc
h as spiral structure, starbursts, galactic winds, and fountains, are
discussed and confronted with observations.