Spectral types are a classification system for stars based on their spectral characteristics, primarily temperature, which is indicated by the absorption lines in their spectra. This system, ranging from O, B, A, F, G, K, to M, helps astronomers determine various stellar properties such as luminosity, mass, and evolutionary stage.