The Sun is composed of concentric spherical layers of gravitationally stratified gas.
At the centre of the Sun is the core, which is about (where is the radius of the Sun) in radius, where nuclear fusion converts hydrogen into helium through the proton-proton cycle. The energy produced in this region (in the form of X-rays and gamma rays) then travels outwards through a wide shell, known as the radiation zone. This region is surrounded by the convection zone, where the heat transport is made more effective by overturning motions of the solar plasma. In both the radiation zone and the convection zone, the system is optically thick, meaning that photons are unable to escape this region, due to photon scattering and absorption/re-emission. The top of the convection zone is known as the photosphere, the visible surface of the Sun, from where radiation is finally able to escape.
The solar atmosphere extends beyond the photosphere, and consists of three layers: the chromosphere, the transition region and the corona. The temperature rises from about C in the photosphere to about C in the chromosphere, and then to around a million degrees in the corona.