
The sun lies at the heart of the solar system, where it is by far the largest object. It holds 99.8 percent of the solar system's mass and is roughly 109 times the diameter of the Earth — about one million Earths could fit inside the sun. From studies of other stars which astronomers can see in many different stages of their 'life cycle', it seems pretty convincing from the data that the sun must have started out as a large collapsing cloud of gas inside some ancient interstellar cloud. This cloud was 'polluted' by a supernova several million years before the collapse phase ended, because we see certain isotopes of aluminum which could not have been a part of this cloud for very long unless they had been implanted by such an event. The cloud collapsed for millions of years until it formed a rotating disk with a large central bulge. Out of the disk would eventually form the planets, and out of this central bulge where most of the mass wound up, formed the sun. We see such rotating disks of gas around many infant stars embedded in nebulae so this has confirmed this basic picture during the last 15 years or so. This isn't just 'theory' anymore. The central bulge continued to collapse under its own gravity until deep in its interior the temperatures got so high...several million degrees....that deuterium atoms began to fuse and give off thermonuclear energy. This slowed the collapse down a bit and eventually led to a second stage where hydrogen nuclei could fuse into helium, which then started the sun's current evolutionary phase. NASA