The sun is the largest object in the solar system, containing over 99% of its mass. It emits light and heat that support life on Earth and influence all solar system objects. The sun has various internal layers, including the core where energy is produced through nuclear fusion, and an outer atmosphere. Sunspots, solar flares, and other features periodically appear on its surface. In a few billion years, the sun will expand and grow hotter, eventually making Earth uninhabitable.