Here's a breakdown:
1. Convection: The Sun's energy is generated in its core through nuclear fusion. This energy travels outwards, heating the outer layers of the Sun. Hotter, less dense plasma rises towards the surface, while cooler, denser plasma sinks back down. This continuous cycle of rising and sinking plasma is called convection.
2. Granules: These rising and sinking convection cells create a pattern of bright, hot regions (granules) surrounded by darker, cooler regions (intergranules). These granules are constantly changing and evolving, with new ones appearing and old ones disappearing.
3. Appearance: From Earth, we see these convection cells as a grainy texture on the Sun's surface. Each granule is about 1000 km across and lasts for about 10-20 minutes.
Therefore, the grainy appearance of the Sun's surface is a direct consequence of the turbulent convection that drives the energy transport within the star.