A high percentage of the solar energy reaching the earth is absorbed by the earth's surface, which increases its temperature. The rest of the heat radiates back to the atmosphere. Some of the heat is trapped by gases such as carbon dioxide, methane, ozone, chlorofluorocarbon compound (CFCs) and water vapour in the atmosphere.
Large amounts of methane are released in paddy fields, coal mines, from rotting garbage dumps and by fossil fuels whereas chlorofluorocarbons (CFCs) are man-made
industrial chemicals used in air conditioning etc. CFCs are also damaging the ozone layer. Nitrous oxide occurs naturally in the environment but is increasing day by day by human activities.
Thus, they add to the heating of the atmosphere. This causes global warming.