Putting together lots of such information has allowed a large number of stars to be catalogued, with the result that certain combinations of brightness and spectral "signatures" can be generally assigned to stars of a given age, size and character even before their distance is known empirically by parallax measurements. In this way a great deal has been learned about stellar evolution and (by inference) about the nuclear reactions in the cores of stars. This is the science of astrophysics, which differs from astronomy in that the latter seeks mainly to observe while the former seeks to explain the stars.
Figure:
A cartoon version of the Hertzsprung-Russell diagram
showing the common categories of stars arranged by their
spectral class (colour) and brightness.
Astrophysical theories of stellar evolution are wondrous detailed, which suggests that I omit further attempts to describe them here. It is important to note, however, that much of the edifice of cosmology rests upon the internal consistency and predictive power of these theories.