The core represents 25 percent of the sun's area and is the innermost section. It is the region where the sun's energy is created through nuclear reactions. This energy eventually becomes light after leaving the sun's surface. Because the core is at the center of the sun, it is both the hottest and the densest part of the sun.
The radiative zone surrounds the core of the sun and diffuses energy through gamma rays and X-rays, both of which are radioactive photons. Photons that the radiative zone generates travel at the speed of light but because they bounce off other particles, it can take them a 100,000 to 1 million years to depart this region. Scientists call the action of these photons bouncing off other particles the "random walk" because they bounce randomly throughout the region until they escape. These photons lose both heat and density as they travel. The size of the radiative zone depends upon the size of a star. Because the sun is a dwarf star, it's radiative zone is smaller than those of stars that are larger than it. Very small stars may not even have a radiative zone while extremely large stars may have a massive radiative zone and no convective zone.
The interface layer is a thin region of the sun that lies between the radiative zone and the convective zone. This region generates the magnetic field of the sun. Photons escaping the radiative layer travel outward through this section toward the convection zone, where they will become more active. Because the velocity of objects in this section change as they travel, it is sometimes called the tachocline layer.
The last inner region of the sun is the convection zone. This region is the coolest region as it is farthest from the core. Because it is cooler, heavier elements like carbon are able to exist there. These elements trap the radioactive gamma and X-ray photons that the radiative layer generates. This process holds in the heat and convects or "boils" the heavier elements. The convected material is hotter than its surroundings and rises to the surface of the sun.