The green-house effect is the most important cause behind global warming. In fact global warming is known as the greenhouse effect. This phenomenon leads to an increase in the Earth temperature due to certain gases like CO2, nitrous oxide, and methane. These gases trap the energy from the sun and without them the heat would go back into space and Earth would be one massive iceberg. Since these gases warm the Earth, they are known as greenhouse gases.
In the last couple of decades, people have started using glass houses to grow plants in winter and these are called greenhouses. Typically, these houses will trap the heat from the sun. The glasses in the greenhouse let the light through and at the same time prevent the heat from escaping.
As a result, the greenhouse heats up to keep the plants alive in the winter. Similarly, the greenhouse gases in the Earths atmosphere work like the glass and prevent the heat from escaping. The sunlight enters piercing through the cloud of greenhouse gases and when it reaches the Earths surface, it is absorbed by land, water, and air.
After absorption the same energy is sent back into the atmosphere. Some of it remains trapped in the atmosphere due to the greenhouse gases and this energy makes the Earth warmer. Since there has been an increase in CO2 emissions in the last couple of decades, more and more heat is being absorbed in the atmosphere. This is increasing the temperature of the Earth gradually and causing global warming.