When a star like our Sun burns out, it doesn’t go quietly. It has a colorful “last hurrah.” It puffs off glowing clouds of gas. Those form a planetary nebula.
The gases are affected by the spinning and wobbling star. They make shapes that look like a carnival spin-art game. Stars ten times bigger than the Sun go out with a bang. The nuclear furnace suddenly shuts down, and it collapses (falls apart). The collapse is very violent. The star explodes with as much energy as a hundred thousand trillion trillion of the biggest nuclear bombs blowing up at once! This explosion is called a supernova.