A star is a huge glowing ball of hot gas. Deep inside its core, hydrogen atoms smash together, forming helium and releasing huge amounts of energy that heats the gas. This is called nuclear fusion, and it's why a star shines. As the hot gas pushes outward, it opposes the inward pull of gravity.