In the boundless expanse of the sky, in a place away from light pollution and atmospheric pollution, with the naked eye you can see countless stars and sometimes a handful of planets, both in full brightness. Of course, this is while the stars themselves are the source of light, but the planets do not have their own light, and their brightness is due to the reflection of the light of a nearby star. Like the planets of the solar system, whose brightness is due to the reflection of sunlight. But what is the source of light and brightness of stars?
Stars are made of gas. Gas molecules are colliding with each other every moment due to the density of a star. In other words, the mean free distance of each atom is very short. In the core of a young star with a temperature of ten million Kelvin, hydrogen atoms collide and helium atoms are produced. A lot of energy is released in this collision. This is a nuclear fusion. In stars with a longer life, at a temperature of 100 million Kelvin, helium atoms collide and carbon is produced.
When we follow these processes and the temperature of the star reaches more than 9-10 K, oxygen is produced. At a temperature higher than 109 K, the fusion of various elements such as oxygen, magnesium and sulfur occurs. Finally, during these processes, neon, sodium, silicon, argon and iron are also produced in the star. Which elements these processes continue to produce depends on the star's mass. All of these processes that occur during the lifetime of all stars are called "fusion". Fusion means the combination of two atomic nuclei and the production of a larger nucleus, which involves a lot of light and heat. In detail, when two nuclei are combined, a small amount of their mass is converted into energy. According to Einstein's famous Mass–energy equivalence, a lot of energy can be obtained by fusing a small mass of matter.
In fact, the source of light and heat of the stars is the fusion reactions that take place layer by layer inside the star. The amount of density and pressure differs from the surface to the center of a star. Finally, at the end of a star's life, we can see different elements in the star which is an ongoing process in each layer. In fact, the star looks like a layered onion. The most superficial layer is still fusing hydrogen and producing helium, and in the innermost layers, depending on the mass of the star, we can see various other elements.