Stars are classified using the Hertzsprung-Russell diagram, which plots stars' luminosity against their surface temperature. Most stars lie on the main sequence, including our Sun. Stars produce energy through nuclear fusion, with hydrogen fusing to form helium in their cores. This process powers stars for billions of years until they run out of hydrogen fuel and evolve into other stages like red giants or white dwarfs. The Sun has various internal layers and an atmosphere, and features like sunspots and solar flares occasionally appear on its surface.