(Abridged) We use new multi-wavelength radio observations, made with the VLA
and Effelsberg telescopes, to study the magnetic field of the nearby galaxy M51
on scales from $200\pc$ to several $\kpc$. Interferometric and single dish data
are combined to obtain new maps at \wwav{3}{6} in total and polarized emission,
and earlier \wav{20} data are re-reduced. We compare the spatial distribution
of the radio emission with observations of the neutral gas, derive radio
spectral index and Faraday depolarization maps, and model the large-scale
variation in Faraday rotation in order to deduce the structure of the regular
magnetic field. We find that the \wav{20} emission from the disc is severely
depolarized and that a dominating fraction of the observed polarized emission
at \wav{6} must be due to anisotropic small-scale magnetic fields. Taking this
into account, we derive two components for the regular magnetic field in this
galaxy: the disc is dominated by a combination of azimuthal modes, $m=0+2$, but
in the halo only an $m=1$ mode is required to fit the observations. We disuss
how the observed arm-interarm contrast in radio intensities can be reconciled
with evidence for strong gas compression in the spiral shocks. The average
arm--interam contrast, representative of the radii $r>2\kpc$ where the spiral
arms are broader, is not compatible with straightforward compression: lower
arm--interarm contrasts than expected may be due to resolution effects and
\emph{decompression} of the magnetic field as it leaves the arms. We suggest a
simple method to estimate the turbulent scale in the magneto-ionic medium from
the dependence of the standard deviation of the observed Faraday rotation
measure on resolution. We thus obtain an estimate of $50\pc$ for the size of
the turbulent eddies.Comment: 21 pages, 18 figures (some at lower resolution than submitted
version), accepted for publication in MNRA