Mathematical Models
Astronomers construct mathematical models of the interior of a star using the information pouring from the surfaces of stars (especially the Sun) and their knowledge of how gases behave under different conditions. The mathematical models are a set of equations that describe how things work layer by layer in a star. Fortunately, the interior of stars is completely gaseous all the way to the center, so the equations are relatively simple (whew!). The physics of gases can be described with just three parameters:
Temperature---a measure of the random motion energy (the average kinetic energy) of the gas particles. The higher the temperature, the more random kinetic energy is present.
Pressure---the amount of force/area. Hot gas expands to create pressure on its surroundings. For example, the gas inside a hot air balloon pushes out on the material of the balloon enclosing the gas.
Mass Density---the amount of mass/volume. Gaseous material can be compressed to smaller volumes and higher densities.