Gases such as carbon dioxide, water vapor, methane and other trace gases allow incoming sunlight to pass through, but, retain heat radiated back from the planet's surface.
Here are some short videos that help explain the above:
"How Do Greenhouse Gases Actually Work?"
3 minute video:
Here are some key words/phrases to get your googling started:
Radiation balance - incoming radiant energy from the sun minus outgoing energy heading into space.
Infrared radiation - electromagnetic radiation that is invisible to us; comes in longer wavelengths than visible light and provides energy transfer we call heat.[Actually, I suggest you copy and paste the entire block of search words into one search.]
"How The Earth's Climate Works and the Greenhouse Effect"
6 minute video:
A scientifically correct educational animation of how the Earth's climate functions and how the Greenhouse Effect works in demonstrating how global warming happens.
The "Greenhouse Gas Demo" is a short, but very effective and dramatic classroom demonstration to show the effect on temperature of increased levels of carbon dioxide
4 minute video