We have aggregated together data available in the literature, or analysed by us, to compute the lightcurves of most young supernovae (SNe) that have been detected in X-rays. Currently the database contains about 60 SNe spanning all the various types, but it is expanding rapidly. We use this library of lightcurves and spectra to explore the diversity of SNe, the characteristics of the environment into which they are expanding, and the implications for their progenitors. X-ray spectra can provide insight into the density structure, composition and metallicity of the surrounding medium, and the ionization level, through the spectra themselves as well as the X-ray absorption. Since core-collapse SNe expand mainly in environments created by the progenitor star mass-loss, this can provide crucial information about the nature of the progenitor star, and its mass-loss parameters in the decades or centuries before its death. In a few cases, via detailed modelling, we can distinguish the composition of the SN ejecta from that of the environment. X-ray observations therefore provide an invaluable probe into the stellar environments of core-collapse SNe, complementing data available at other wavelengths. We provide an overview of the X-ray lightcurves of various SN types, the implications for their environment, and clues to their progenitor stars.