Stars form in the densest regions of nebulae, as shown in Figure 16. Stars are created by gravity. Gravity pulls a nebula's dust and gas into a denser cloud. As the nebula contracts, it heats up. A contracting cloud of gas and dust with enough mass to form a star is called a protostar. As a protostar contracts, its internal pressure and temperature continue to rise. A star is formed when a contracting cloud of gas and dust becomes so dense and hot that nuclear fusion begins. Pressure from fusion supports the star against the tremendous inward pull of gravity. This new energy source stabilizes the young star, and it joins the main sequence.
Figure 16 A group of bright young stars can be seen in the hollowed-out center of the Rosette Nebula.
Stars spend about 90 percent of their lives on the main sequence. In all main-sequence stars, nuclear fusion converts hydrogen into helium at a stable rate. There is an equilibrium between the outward thermal pressure from fusion and gravity's inward pull. A star's mass determines the star's place on the main sequence and how long it will stay there.
The amount of gas and dust available when a star forms determines the mass of each young star. The most massive stars have large cores and therefore produce the most energy. In a large, young star with 30 times the sun's mass, gravity exerts a huge inward force, increasing the star's internal temperature and pressure. High-mass stars become the bluest and brightest main-sequence stars. Typically, these blue stars are about 300,000 times brighter than the sun. But, like gas-guzzling hot rods, large stars pay a price. Because blue stars burn so brightly, they use up their fuel relatively quickly and last only a few million years.
Stars similar to the sun occupy the middle of the main sequence. A yellow star like the sun has a surface temperature of about 6000 K and will remain stable on the main sequence for about 10 billion years.
Small nebulas produce small, cool stars that are long-lived. A star can have a mass as low as a tenth of the sun's mass. The gravitational force in such low-mass stars is just strong enough to create a small core where nuclear fusion takes place. This lower energy production results in red stars, which are the coolest and least bright of all visible stars. A red main-sequence star, with a surface temperature of about 3500 K, may stay on the main sequence for more than 100 billion years.