Scientists have concluded that most of the observed warming is very likely due to the burning of coal, oil, and gas. This conclusion is based on a detailed understanding of the atmospheric greenhouse effect and how human activities have been tweaking it. At the same time, other reasonable explanations, most notably changes in the Sun, have been ruled out.
The atmospheric greenhouse effect naturally keeps our planet warm enough to be livable. Sunlight passes through the atmosphere. Light-colored surfaces, such as clouds or ice caps, radiate some heat back into space. But most of the incoming heat warms the planet's surface. The Earth then radiates some heat back into the atmosphere. Some of that heat is trapped by greenhouse gases in the atmosphere, including carbon dioxide (CO2).