Formed from a gaseous cloud
The Sun was formed 4.6 billion years ago from a gaseous cloud that contracted under the effect of gravitational forces, increasing its heat. The planets also emanate from this same initial gas cloud.
The triggering of the contraction was probably due to a disturbance, perhaps the explosion of a nearby supernova. At a temperature of one million degrees, nuclear fusion reactions of hydrogen began to occur, triggering the emission of visible light by the Sun.
Fusion releases large amounts of energy
The Sun draws its energy from the fusion reactions that take place in its heart, where the temperature is about 15 million degrees. These reactions transform hydrogen into helium: hydrogen nuclei assemble to form a heavier helium nucleus.
The fusion releases large amounts of energy, transforming mass (m) into energy (E) according to the famous Einstein equation E=mc2 (where c is the speed of light).
The other stars shine as well thanks to the energy produced by the fusion of the atomic nuclei. On Earth, we also seek to use nuclear fusion to produce energy.