We review oxygen K-edge X-ray absorption spectra of both molecules and solids. We start with an overview of the main experimental aspects of oxygen K-edge X-ray absorption measurements including X-ray sources, monochromators, and detection schemes. Many recent oxygen K-edge studies combine X-ray absorption with time and spatially resolved measurements and/or operando conditions. The main theoretical and conceptual approximations for the simulation of oxygen K-edges are discussed in the Theory section. We subsequently discuss oxygen atoms and ions, binary molecules, water, and larger molecules containing oxygen, including biomolecular systems. The largest part of the review deals with the experimental results for solid oxides, starting from s- and p-electron oxides. Examples of theoretical simulations for these oxides are introduced in order to show how accurate a DFT description can be in the case of s and p electron overlap. We discuss the general analysis of the 3d transition metal oxides including discussions of the crystal field effect and the effects and trends in oxidation state and covalency. In addition to the general concepts, we give a systematic overview of the oxygen K-edges element by element, for the s-, p-, d-, and f-electron systems.