A star is a big ball of gas. When you heat it up, it expands, just like any other ball of gss. For a normal HOT hydrogen stars, in fact, you can even use the ideal gas law, PV = nRT. (When the star gets too dense, the pressure is actually higher than given by this relationship).

Combine this with the normal fact that pressure increases with depth by the relation

delta-Pressure = density*g*delta-h, g being the local acceleration of gravity, and you have the equations you need to model stellar structure at a very basic level. Note that this formula is the same formula you use to calculate the pressure at the bottom of a water tank, except that the for water tanks the density of water and the gravitational acceleration g are both constant, where as neither of these are constant in stars.

For a non-relativistic model you'd use Newtonian gravity, for a fully relativistic star you need to use general relativity to determine the gravity.

http://www.astronomynotes.com/starsun/s7.htm
looks like a good reference if you want to read a little more.