1. Gravitational Collapse: A star begins its life as a massive cloud of gas and dust, primarily composed of hydrogen and helium. Due to the force of gravity, this cloud starts collapsing inward.
2. Pressure and Temperature Increase: As the cloud collapses, the pressure and temperature at the core increase immensely. This compression causes the atoms to move faster and collide more frequently.
3. Nuclear Fusion: At extremely high temperatures and pressures, the hydrogen atoms in the core overcome their mutual repulsion and fuse together to form helium atoms. This process is known as nuclear fusion. During fusion, a significant amount of energy is released in the form of gamma rays.
4. Radiation: The high-energy gamma rays produced by fusion interact with other atoms and particles in the star's core, converting them into lower-energy photons (particles of light). These photons make their way through the star's layers and eventually escape into space.
5. Emission of Light: As the photons travel through the star's layers, they interact with various atoms and molecules, resulting in the emission of different wavelengths of light. The combination of these emitted photons gives stars their characteristic colors.
The overall process of nuclear fusion in the core of a star generates a continuous release of energy, causing the star to emit light and heat throughout its lifetime.