Intergalactic space is filled with a pervasive medium of ionized gas, the intergalactic medium ͑IGM͒. A residual neutral fraction is detected in the spectra of quasistellar objects at both low and high redshifts, revealing a highly fluctuating medium with temperatures characteristic of photoionized gas. The statistics of the fluctuations are well reproduced by numerical gravity-hydrodynamics simulations within the context of standard cosmological structure formation scenarios. Thus, the study of the IGM offers an opportunity to probe the nature of the primordial density fluctuations on scales unavailable to other methods. The simulations also suggest that the IGM is the dominant reservoir of baryons produced by the Big Bang, and so the principal source of the matter from which galaxies formed. The detection of metal systems within the IGM shows that it was enriched by evolved stars early in its history, demonstrating an intimate connection between galaxy formation and the IGM. A comprehensive review of the current understanding of the structure and physical properties of the IGM and its relation to galaxies is presented, concluding with comments on prospects for furthering the study of the IGM using future ground-based facilities and space-based experiments.