The greenhouse effect is the process where heat is trapped within the atmosphere by "greenhouse gases" (GHGs). When light and heat from the sun pass through the earth's atmosphere, they are absorbed by soil, rocks, water, and living organisms on the planet's surface. The earth then radiates some of that absorbed energy back into the atmosphere, in the form of heat. GHGs in the atmosphere act like a blanket around the earth, trapping some of the re-radiated heat, while some passes through to outer space. It is this natural process that has allowed the planet to maintain a climate warm enough to sustain life.
But as GHGs build up in the atmosphere, it's like adding a thicker and thicker blanket around the earth, trapping more heat and allowing less to escape into space. Over time, this trapped heat raises the surface temperature of the earth. Carbon dioxide (CO2) and methane (CH4) are two of the most significant GHGs. Others include water vapor and nitrous oxide. Most of these gases occur naturally, but human activities add more GHGs to the atmosphere than would naturally occur. For example, burning fossil fuels to produce electricity and to power vehicles is a major source of CO2 emissions. Other human activities, such as deforestation, reduce the natural ability of the earth to capture CO2 from the atmosphere and store it in plant matter and soil. The higher the concentration of GHGs in the atmosphere, the more the global temperature will rise.