The greenhouse effect is caused by gases such as carbon dioxide (CO₂) and methane (CH₄) that trap heat in the Earth's atmosphere. While this effect is critical for sustaining life by keeping the planet warm, an increase in these gases, primarily due to human activities, leads to global warming, resulting in severe environmental consequences.