Solid oxygen is a unique crystal combining properties of a simple molecular solid and of a magnet. Unlike ordinary magnets, the exchange interaction in solid oxygen acts on a background of weak Van der Waals forces, providing a significant part of the total lattice energy. Therefore, the magnetic and lattice properties in solid oxygen are very closely related which manifests itself in a very rich phase diagram and in numerous anomalies of thermal, magnetic, and optical properties. Diamond-anvil-cell studies have extended the phase diagram of solid oxygen to the pressure range over 2 Mbar and temperatures over 1000 K, thereby revealing an astonishing variety of phases. Pressure-induced changes in crystalline structures are accompanied by modifications of the optical response. From a light blue transparent crystal, oxygen turns orange and then red at approximately 10 GPa. Upon further compression, the crystal gets darker and becomes nearly opaque to visible light at around 40 GPa. This color change, which is an evident example of how compression can perturb the electronic states of a simple molecule, is a peculiarity of solid oxygen and does not occur in other light homonuclear diatomic molecular solids. At 96 GPa solid oxygen transforms to a metal retaining the diatomic molecular structure. At low temperatures of 0.6 K metallic oxygen becomes superconducting. The paper provides a comprehensive and up-to-date review of the experimental and theoretical literature on solid oxygen.