The axion has emerged in recent years as a leading particle candidate to provide the mysterious dark matter in the cosmos, as we review here for a general scientific audience. We describe first the historical roots of the axion in the Standard Model of particle physics and the problem of charge-parity invariance of the strong nuclear force. We then discuss how the axion emerges as a dark matter candidate and how it is produced in the early universe. The symmetry properties of the axion dictate the form of its interactions with ordinary matter. Astrophysical considerations restrict the particle mass and interaction strengths to a limited range, which facilitates the planning of experiments to detect the axion. A companion review discusses the exciting prospect that the axion could be detected in the near term in the laboratory.