This book covers the structure and dynamics of atomic nuclei in terms of nucleons, pions, and quarks, all within a unified treatment of the nuclear response to an electromagnetic probe. The basic formalism is presented to describe the electromagnetic field and its interaction with nuclear matter for both real and virtual photons. Nuclear response is then analyzed in terms of structure functions in the case of inclusive and semi-inclusive inelastic electron scattering. The discussion covers pion production and one- or two-nucleon emission and compares the results with available data. The formalism is also extended to incident polarized electrons, polarized targets and nuclear recoil polarization. It contains a comprehensive description of photonuclear reactions at intermediate energies and a review of experimental data and previous theoretical approaches.