gas pressure
Blow up a balloon and it stays taut because countless air molecules inside are bouncing off the rubber, each tiny tap adding up to an outward push. Heat that balloon and it swells, because hotter molecules move faster and hit harder. Gas pressure is exactly this — the outward push produced by the relentless, random motion of particles drumming on whatever contains them. Inside a star there is no balloon skin, but the same drumming of hot gas pushes outward against the weight of the layers above, and that push is most of what holds the star up.
For ordinary stellar gas the relationship is captured by the ideal gas law, which says the pressure rises in proportion to both the density of particles and the temperature: pack in more particles or make them hotter, and the pressure climbs. In a star's core the gas is fully ionized — atoms stripped into bare nuclei and free electrons — so both the nuclei and the electrons contribute their own thumping. The numbers are extreme: solar-core gas is over a hundred times denser than water, yet so hot (15 million kelvin) that it behaves as a gas, not a solid or liquid.
Gas pressure is the main support for ordinary stars across most of their lives, and the link between pressure and temperature is what makes them stable thermostats. Burn fuel a little too fast and the core heats, pressure rises, the core expands and cools, and burning slows — a built-in safety valve. This breaks down in two regimes that get their own entries: very massive stars, where radiation pressure takes over, and dead stellar cores, where electron degeneracy pressure no longer cares about temperature at all.
If you could magically cool the Sun's core by 10 percent without changing its density, the gas pressure would drop by about 10 percent too — and the outer layers, no longer fully supported, would start to settle inward until the squeeze reheated the core. That tight pressure-temperature coupling is what keeps the Sun steady.
In normal stars pressure tracks temperature, giving the star a self-stabilizing thermostat.
The familiar pressure-temperature link belongs to ordinary (ideal) gas. In a white dwarf the supporting pressure is degeneracy pressure, which barely depends on temperature — which is why dead cores can cool for ages without collapsing.