The main sequence is a region on a Hertzsprung-Russell Diagram where most stars appear. Any star that is plotted in that area is a main-sequence star. The Sun is a main-sequence star. Most of the stars in the Milky Way galaxy and most other galaxies are also main-sequence stars. This is because stars on the main sequence are highly stable, so they remain there a long time.
Hertzsprung-Russell diagrams are graphs that measure each star's brightness against its temperature or color. The main sequence appears as a band going from the upper-left (hot and bright) to the lower-right (cooler and less bright). You can see an example of the band of main-sequence stars to the right.
Stars are created from nebula and first appear on the main sequence. They stay on the main sequence for millions or billions of years. When a star begins to run out of fuel, it gets much bigger and colder and turns into a red giant. After this happens, the star is no longer on the main sequence. It does not spend so much time in its red giant phase.
In general, the hottest and brightest stars (in the upper-left of the Hertzsprung-Russell diagram) also have the most mass. The main sequence is sometimes divided into two parts. Any star that has a mass greater than 1.5 times the Sun's mass is grouped into the upper main sequence; any star with a mass lower than 1.5 solar masses belongs to the lower main sequence.
Stars get the energy they produce through nuclear fusion of hydrogen into helium. The upper main sequence (hot and bright with the most mass) produces energy by one type of nuclear fusion involving only hydrogen and helium. The lower main sequence (cooler and less bright with a lower mass) produces energy by another type of nuclear fusion. This type uses other elements (for example, carbon, nitrogen and oxygen) with higher atomic numbers as nuclear catalysts.
Because of these different types of fusion, stars on the lower main sequence last much longer than stars on the upper main sequence. Our Sun is located on the lower main sequence and is predicted to last between 10 and 12 billion years. A star located on the upper main sequence may only last a few million years.
Nowadays, a new star may be classified as main sequence just by its color. A main sequence star of a particular color has a narrow band of brightness when seen from a standard distance. An astronomer could calculate the distance to this newly-discovered star by comparing its brightness as seen from Earth against the brightness for a certain color on the main sequence.