I understand that stars could be created in different densities of gas, but have always assumed that fusion would always occur once a certain critical mass had been achieved. Once this mass had been achieved and fusion started then the outward pressure would counteract the gravitation inflow of matter and so all stars would be roughly the same size, yet this is not the case.
First, you should understand that there are several types of stars. Main sequence stars are those that fuse hydrogen into helium in their cores. There are other stars like giant stars which have exhausted hydrogen in their cores and are in various stages of evolution.
The density of gases in main sequence stars are roughly the same as the main constituent is always hydrogen and helium. The size of stars depends mainly on its mass. Note that what determines the birth of a star is not a critcal mass (even though that is important in determining the minimum mass required to form a star) but the temperature reached in the core of the star. A star is born as a main sequence star when the temperature of the star's core becomes high enough to fuse hydrogen into helium. So, it is not the mass of the core that is constant in stars, but the temperature of the core and that is around 15 million degrees Kelvin.
Now, stars are born out of dense cores in molecular clouds. In general, bigger the mass of the dense core, the more massive the star that is born from it. This is simply because the star has more material to accrete from.
The radius of a star is determined by hydrostatic equilibrium which is the balance between the energy generation in the center of the star and gravity that tends to collapse the star. In more massive (main sequence) stars, there is more matter and the pressure in the core is more. As a result (and a couple of other details), the rate of fusion in massive stars is much more than in low mass stars. This higher rate of energy generation helps balance the greater mass and the radius of these stars is more than those of low mass stars.
The story is different in evolved stars like giant stars. Once hydrogen in the core of the star is exhausted, the energy generation becomes small and the core starts to collapse. But as the star collapses, the temperature inside the star goes up and at some point, the hydrogen in the shell outside the core starts to fuse. This is called shell burning and produces a lot of energy in a small timescale. This sudden release of energy in shell burning causes the envelope of the star to expand by a huge amount so that the star becomes bloated. This is the reason why you find some stars that are cool outside (like Betelguese) and much larger than the size of the Sun (if you put Betelguese in the position of the Sun, it will extend to outside the radius of Jupiter).
This page updated on June 27, 2015