The sun is a big ball of gas held together by gravity.
Q: Why doesn't it fall in on itself?
A: Hydrostatic Equilibrium
Hydrostatic Equilibrium is the balance between pressure pushing the star apart, and gravity pulling the star inwards.