Greenhouse gases trap the heat in the atmosphere.
They keep the surface temperature of the Earth warmer, acting as insulation. As the sun warms the Earth, it causes the surface to radiate heat which is absorbed by greenhouse gases.
The main greenhouse gases are carbon dioxide, methane, nitrogen oxide, chlorofluorocarbons, ozone and water vapour. These gases absorb the infrared radiation causing the temperature to rise.
Without greenhouse gases, the average temperature of Earth’s surface would be freezing, about -18C.
Briefing: Climate modelling – an overview
Briefing: A closer look at climate modelling