About half a million years after the Big Bang, the ever-fading cosmic blackbody radiation cooled below 3000 K and shifted first into the infrared and then into the radio, and the smooth baryonic plasma that filled the Universe became neutral. The Universe then entered a ``dark age'' which persisted until the first cosmic structures collapsed into gravitationally-bound systems, and evolved into stars, galaxies, and black holes that lit up the Universe again. Some time between redshift of 7 and 15, stars within protogalaxies created the first heavy elements; these systems, together perhaps with an early population of quasars, generated the ultraviolet radiation that reheated and reionized the cosmos. The history of the Universe during and soon after these crucial formative stages is recorded in the all-pervading intergalactic medium (IGM), which is believed to contain most of the ordinary baryonic material left over from the Big Bang. Throughout the epoch of structure formation, the IGM becomes clumpy and acquires peculiar motions under the influence of gravity, and acts as a source for the gas that gets accreted, cools, and forms stars within galaxies, and as a sink for the metal enriched material, energy, and radiation which they eject. Observations of absorption lines in quasar spectra at redshifts up to 5 provide invaluable insight into the chemical composition of the IGM and primordial density fluctuation spectrum of some of the earliest formed cosmological structures, as well as of the ultraviolet background radiation that ionizes them.