We collect that light, and we analyze it in great detail in order to determine what's going on, what's the chemical makeup of the star, what's the pressure inside, what's the temperature, what kind of nuclear reactions are going on, how does a star explode.
All of these things we figured out through the analysis of light.
Astronomers deduce that only stars with a huge mass go out with a bang.
A massive star has a very interesting and vigorous life.
Initially, it fuses hydrogen to form helium, and that produces energy.
That makes the star shine.
Then the ashes of that reaction, the helium, fuse together to form carbon and oxygen, releasing yet more energy.
Then the carbon and oxygen can fuse into still heavier elements, magnesium and sodium and neon and things like that, and then silicon and sulfur, and finally iron.
When it starts to make iron, the giant star is doomed.
In the core, a fierce battle takes place: energy pushes outwards, holding it up, while gravity wants to crush it inwards.