A star is often described as a glowing ball of gas. While that is not wrong, it misses the essential point. A star is not simply a hot object. It is a system in which two opposing tendencies are held in balance.
On one side, there is gravity. The matter that makes up the star is pulled inward by its own gravitational field. Left to itself, this pull would cause the star to contract further and further.
On the other side, there is pressure. As the star contracts, its interior becomes denser and hotter. At sufficiently high temperatures, nuclear reactions begin to occur. These reactions release energy, which increases the pressure inside the star and resists further collapse.
A star exists in the regime where these two effects balance each other. Gravity pulls inward, while pressure generated by energy release pushes outward. The result is a stable configuration that can persist for a long time.
The energy that sustains this balance comes primarily from nuclear fusion. In the simplest case, hydrogen nuclei combine to form helium. This process releases energy because the resulting configuration has a lower energy than the initial one. That energy appears as radiation and heat inside the star, and ultimately escapes into space as light.
This is why stars shine. They are not burning in the usual chemical sense. Instead, they are converting mass into energy through nuclear processes. The light we see from a star is the outward flow of this energy.
The structure of a star is determined by this interplay between gravity and pressure. If the star were slightly compressed, its temperature would rise, fusion would proceed more rapidly, and the increased pressure would push it back outward. If it were slightly expanded, the temperature would drop, fusion would slow down, and gravity would pull it inward again. This feedback stabilizes the system.
Not all stars are the same. Their properties depend primarily on their mass. More massive stars have stronger gravity, higher central temperatures, and more rapid fusion. They are brighter and shorter-lived. Less massive stars burn their fuel more slowly and can persist for much longer times.
Over time, a star changes as it consumes its nuclear fuel. Once the available fuel is depleted or the conditions for fusion change, the balance between gravity and pressure is altered. The star can expand, contract, or evolve into very different states, depending on its mass. Less massive stars may end their lives as compact remnants, while more massive ones can undergo violent explosions that eject material into space. It is in these later stages that many of the heavier elements are produced and dispersed into the surrounding medium.
In that sense, a star is not just a luminous object in the sky. It is a dynamical system in which gravity and energy continuously interact. The light it emits is a visible trace of that process.
What we see as a steady point of light is, in reality, the outcome of an ongoing balance between collapse and expansion, sustained by the conversion of mass into energy.
See also: What is a black hole?
How stars forged heavy elements
How we know the Sun is still burning