Over the past two decades, an avalanche of new data from multiwavelength imaging and spectroscopic surveys has revolutionized our view of galaxy formation and evolution. Here we review the range of complementary techniques and theoretical tools that allow astronomers to map the cosmic history of star formation, heavy element production, and reionization of the Universe from the cosmic “dark ages” to the present epoch. A consistent picture is emerging, whereby the star-formation rate density peaked approximately 3.5 Gyr after the Big Bang, at z≈1.9, and declined exponentially at later times, with an e-folding timescale of 3.9 Gyr. Half of the stellar mass observed today was formed before a redshift z = 1.3. About 25% formed before the peak of the cosmic star-formation rate density, and another 25% formed after z = 0.7. Less than ∼1% of today's stars formed during the epoch of reionization. Under the assumption of a universal initial mass function, the global stellar mass density inferred at any epoch matches reasonably well the time integral of all the preceding star-formation activity. The comoving rates of star formation and central black hole accretion follow a similar rise and fall, offering evidence for coevolution of black holes and their host galaxies. The rise of the mean metallicity of the Universe to about 0.001 solar by z = 6, one Gyr after the Big Bang, appears to have been accompanied by the production of fewer than ten hydrogen Lyman-continuum photons per baryon, a rather tight budget for cosmological reionization.