Stars are born from vast clouds of gas and dust known as nebulae. These clouds are often triggered to collapse under their own gravity by nearby supernova explosions or the shockwaves from a passing galaxy. As the cloud collapses, it heats up due to gravitational energy conversion, forming a dense core known as a protostar.
The color and type of star that emerges depend on various factors, including its mass and temperature. Young stars often emit a reddish glow due to their relatively cooler temperatures. These stars are typically classified as red dwarfs or red giants. As a star evolves and its temperature increases, it may transition to a yellow or white color, indicating a higher luminosity and temperature. Blue stars, on the other hand, are typically hotter and more massive, often found in regions of active star formation within spiral galaxies.
The process of stellar birth and evolution is complex and dynamic, leading to a diverse array of stars with different colors, sizes, and characteristics.