Young O stars are strong, hard, and variable X-ray sources, properties which strongly affect their circumstellar and galactic environments. After ~1 Myr, these stars settle down to become steady sources of soft X-rays. I use high-resolution X-ray spectroscopy and MHD modeling to show that young O stars like theta-1 Ori C are well explained by the magnetically channeled wind shock scenario. After their magnetic fields dissipate, older O stars produce X-rays via shock heating in their unstable stellar winds. Here too I use X-ray spectroscopy and numerical modeling to confirm this scenario. In addition to elucidating the nature and cause of the O star X-ray emission, modeling of the high-resolution X-ray spectra of O supergiants provides strong evidence that mass-loss rates of these O stars have been overestimated.