Greenhouse gases contribute to pollution by trapping heat in the atmosphere, which leads to the greenhouse effect. This effect is essential for life on Earth, but human activities have significantly increased the concentration of these gases, making the Earth's surface warmer. This warming effects air quality, oceans, and weather patterns, contributing to various forms of pollution.