To understand the electrodynamics of mesoscopic media it is in general necessary to take into account local-field effects. This article presents a review of the role played by local fields in the high-frequency electrodynamics of systems exhibiting essential quantum confinement of the electron motion. In Part A, the fundamental local-field theory is described. By combining an electromagnetic propagator formalism with a microscopic linear and nonlocal response theory the basic loop equation for the local field is established and some of its implications studied. Various kinds of local-field calculations are presented and the underlying physical interpretations discussed. In Part B, the basic theory is used to study the linear local-field electrodynamics of a few, but representative and varied, mesoscopic systems. Special emphasis is devoted to investigations of the local-field phenomena in quantum wells and small particles (quantum dots), and to studies of optical near-field electrodynamics and surface dressing of charged wave packets in motion. In Part C, important features of the nonlinear local-field electrodynamics of mesoscopic media are described on the basis of selected examples. Thus, a description of optical second-harmonic generation in quantum wells is followed by a discussion of the photon-drag effect in one- and two-level quantum wells, and in mesoscopic metallic and semiconducting rings. Finally, a local-field study of the optical phase conjugation of the field radiated by a mesoscopic particle is undertaken, and a new route leading to confinement of electromagnetic fields into the so-called quantum dots of light is presented.