I review X-ray observations of classical and recurrent novae in outburst, some of them recently done with Chandra and XMM-Newton for 12 objects. Significant X-ray flux is emitted by the nova shell, with a peak luminosity up to Lx = 1035 erg s–1 in the 0.2-10 keV range. In recurrent nova systems, or in novae hosting a red giant, the source of X-rays may be previous circumstellar matter shocked by the nova wind. However, for most classical novae, X-rays originate inside the nebula ejected in the outburst. The data indicate a very high fraction of shocked material, and a non-smooth, varying wind outflow. A nebular emission line spectrum is also observed at late phases. In about half of the observed novae, the central white dwarf appears as a very luminous supersoft X-ray source for 1 to 9 years after the outburst. It is the best type of object to study the characteristics of shell hydrogen burning on white dwarfs in single degenerate systems. Still incomplete statistics indicate that the duration of the supersoft X-ray phase is peaked around ≃2 years. The correlation of the X-ray light curve with the nova properties is not quite clear. Recently, “template grating spectra” with high S/N have been obtained for V4743 Sgr. The X-ray light curve of this nova reveals a rich and complex power spectrum, with signatures of non-radial g-mode oscillations of the white dwarf. The oscillations and the spectra allow to determine the properties of the shell hydrogen burning white dwarf.