The fusion reactions taking place in the Sun constantly release energy that is emitted in the form of electro-magnetic radiation that includes infra-red radiation, visible light and radiation with higher frequencies. The distance of the Earth from the Sun ensures that an appropriate amount of solar radiation falls on it. Though almost all the radiation falling on the Earth is reflected by the atmosphere and the surface of the Earth, the temperature of the Earth is raised to a higher level due to the greenhouse effect.
This refers to the absorption of radiation that is not reflected back by the atmosphere. Most of the gases that constitute the atmosphere which are nitrogen, oxygen and argon allow the free flow of infra-red radiation through them and are not affected by it. It is the other gases that include carbon-dioxide, water vapor, methane and ozone that are able to absorb infra-red radiation due to their physical properties. Once the heat is absorbed most of it is transmitted to outer space, a small portion though is radiated back to the surface. It is this that ensures the temperature of the Earth is around 33 C instead of being around 5.3 C that would have been the case in the absence of green house gases.