The Sun as well as all the stars that you see in the sky are born in a huge cloud of gas and dust whose center denser and hot has finally light up. How did this happen? One has to imagine a place in the space containing a lot of gas and dust, a protostellar cloud so vast that it is 10 or 100 times larger than the current solar system.
When this cloud is isolated in space and very dense it is called a proplyde. There are many in the constellation Orion. Under the effect of gravity, this cloud of gas and dust starts to turn on itself and contracts more and more, emitting jets of gas perpendicular to the disk. In the center, the temperature begins to rise and soon exceeds 1000 ° C. The cloud continues to contract and eventually the center becomes so dense that it reaches a temperature of a million degrees and titanic pressure. At that moment, nuclear reactions occur and the nucleus begins to shine on its own. In the space of a few hundred million years a star is born!
Just after this period, the planets are formed from the layers of gas and dust remained away from the center. This is how the solar system was formed 4.6 billion years ago.
Unlike the Sun, the majority of stars live in pairs, forming binary or multiple systems. Sometimes these couples are optical illusions because the two stars do not rotate around each other. The planet Jupiter could have become a star if it had been more massive and would have formed a double system with the Sun.
There are also variable stars. During their life their brightness varies periodically or irregularly. Some change luster because a darker companion turns around it and weakens their light like during an eclipse, this is the case of the star Algol in the constellation Perseus that you can observe with the naked eye . This shine change is not due to a physical modification of the star. These stars are called eclipse binaries. Other stars change luster in a few hours or days with the regularity of a clock, these are the Cepheids.
How long does a star live? The life of a star depends on its mass. The Sun for example is not very massive and is a small star not very hot, whose temperature is about 6000 ° C on the surface and 15 million degrees in the nucleus. He should live about 10 billion years and calmly. Then, when it has consumed almost all its hydrogen, it will expand until it reaches the orbit of Venus or perhaps that of the Earth, grilling everything in its path while becoming red and therefore less hot. This is the red giant phase. Become gigantic outer surface will lose gas then it will quickly deflate to finally become cold and very small is the phase of white dwarf.