Physics invites the idea that space contains energy whose gravitational effect approximates that of Einstein's cosmological constant, Lambda; nowadays the concept is termed dark energy or quintessence. Physics also suggests the dark energy could be dynamical, allowing the arguably appealing picture that the dark energy density is evolving to its natural value, zero, and is small now because the expanding universe is old. This alleviates the classical problem of the curious energy scale of order a millielectronvolt associated with a constant Lambda. Dark energy may have been detected by recent advances in the cosmological tests. The tests establish a good scientific case for the context, in the relativistic Friedmann-Lemaitre model, including the gravitational inverse square law applied to the scales of cosmology. We have well-checked evidence that the mean mass density is not much more than one quarter of the critical Einstein-de Sitter value. The case for detection of dark energy is serious but not yet as convincing; we await more checks that may come out of work in progress. Planned observations might be capable of detecting evolution of the dark energy density; a positive result would be a considerable stimulus to attempts to understand the microphysics of dark energy. This review presents the basic physics and astronomy of the subject, reviews the history of ideas, assesses the state of the observational evidence, and comments on recent developments in the search for a fundamental theory.