Our planet is situated in its own greenhouse: the atmosphere.
The greenhouse effect is completely natural, and life on Earth depends on it.
Sunlight - energy from the sun - passes through the atmosphere and warms land and water surfaces
Sunlight is perceived as colorless or as "white" light.
What do you think the red arrows going from the Earth to the air are supposed to symbolize?
Did you ever try sunbathing on cliffs on a nice summer's day?
Even after sunset you can feel the heat from the rocks. The white sunlight has warmed the cliffs during the day.
The cliffs emit rays of energy.
These rays of energy cannot be seen by humans unless we put on special glasses enabling us to see infrared. (The military uses this quite a lot).
So the infrared rays of energy emitted to the air, go back to outer space or temporarily warms the air around us, keeping it warm even when the sun is not shining.
Get hold of a glass prism and see what colours you can get just by breaking the sunlight through it.
Blue is a cold color, red is warm. When red light has increased its wavelength above 700 nanometer, it becomes invisible to us - it is infrared.
When blue light has smaller wavelength than 400 nanometers, it is also invisible to us, but can be seen e.g. by certain insects, like bees. This light we call ultra-violet (UV-light)