We present new infrared observations of the central regions of the starburst galaxy M 82. The observations consist of near-infrared integral field spectroscopy in the H-and K-band obtained with the MPE 3D instrument, and of λ = 2.4 − 45 µm spectroscopy from the Short Wavelength Spectrometer (SWS) on board the Infrared Space Observatory. These measurements are used, together with data from the literature, to (1) re-examine the controversial issue of extinction, (2) determine the physical conditions of the interstellar medium (ISM) within the star-forming regions, and (3) characterize the composition of the stellar populations. Our results provide a set of constraints for detailed starburst modeling which we present in a companion paper.We find that purely foreground extinction cannot reproduce the global relative intensities of H recombination lines from optical to radio wavelengths. A good fit is provided by a homogeneous mixture of dust and sources, and with a visual extinction of A V = 52 mag. The SWS data provide evidence for deviations from commonly assumed extinction laws between 3 µm and 10 µm. The fine-structure lines of Ne, Ar, and S detected with SWS imply an electron density of ≈ 300 cm −3 , and abundance ratios Ne/H and Ar/H nearly solar and S/H about one-fourth solar. The excitation of the ionized gas indicates an average effective temperature for the OB stars of 37400 K, with little spatial variation across the starburst regions. We find that a random distribution of closely packed gas clouds and ionizing clusters, and an ionization parameter of ≈ 10 −2.3 represent well the star-forming regions on spatial scales ranging from a few tens to a few hundreds of parsecs. From detailed population synthesis and the mass-to-K-light ratio, we conclude that the near-infrared continuum emission across the starburst regions is dominated by red supergiants with average effective temperatures ranging from 3600 K to 4500 K, and roughly solar metallicity. Our data rule out significant contributions from older, metal-rich giants in the central few tens of parsecs of M 82.