Here is a model of the inside of the sun. Since the sun is a typical star, this is a good blueprint for the interior of most stars in the sky.
To construct such models, scientists balance, at every place inside the sun, the downward pull of gravity against the outward push of the heated gases.
This diagram tells an interesting story. As you move deeper into the sun, the density reaches values of about 150 grams/cc which is about ten times the density of solid lead. However, the temperature is so high (15.6 million degrees C) that the hydrogen still behaves as a gas.
This is a perfect place for nuclear reactions to occur.