Greenhouse gases trap heat in the Earth's atmosphere, leading to the greenhouse effect. This effect causes global warming and climate change, resulting in extreme weather events, rising sea levels, and disruption of ecosystems.