Massive Stars
Once massive stars reach the red giant phase, the core temperature increases.
Gravity continues to pull carbon atoms together as the temperature increases forming oxygen, nitrogen, and eventually iron.
At this point, fusion stops and the iron atoms start to absorb energy.
This energy is eventually released in a powerful explosion called a supernova.