Main sequence stars are those which shine by the fusion of hydrogen into helium. These stars are generally dwarfs. Most main sequence stars are small red dwarfs of class M v; these have lifetimes of tens of billions, hundreds of billions, or even trillions of years (depending on mass and luminosity).
Sol, the star of the Old Solar System, is a larger G class yellow dwarf, and has a lifetime on the main sequence of ten billion years. When a star like Sol leaves the main sequence it begins to fuse helium into heavier elements, and swells up into a red giant (followed by several other post-main-sequence states).
The general rule is that the larger the star, the shorter the stay on the main sequence. The largest stars of all are only briefly on the main sequence, if at all; they begin to fuse helium and heavier elements after a few tens of thousands of years, and eventually explode as supernovae.