Greenhouse gases are present in the atmosphere. They absorb and re-emit the sun's radiation, warming up the Earth. Without greenhouse gases, the Earth would be on average up to 33°C (59°F) colder. Rather than simply decreasing, the temperature would plummet during the night, due to lack of direct sunlight.
Human influence can lead to global warming through large-scale greenhouse gas emissions. A considerable fraction of the Sun's energy that reaches Earth is not reflected back into space, but is absorbed by greenhouse gases and thus warms the atmosphere.
Greenhouse gases include carbon dioxide, water vapor, nitrous oxide and methane, but the effect of each on global warming is not the same. Methane is a much "stronger" greenhouse gas than carbon dioxide, for example.
Figure 1: Greenhouse gases warm the Earth through absorbing and reflecting radiation.
Contrary to popular belief, greenhouse gases are not responsible for the disappearance of the ozone layer. Gases known as "chlorofluorocarbons", which used to be very widely-used in various appliances like fridges, deplete the ozone layer. When these gases were freed, they would liberate chlorine molecules, which would eat away at the ozone layer.