A greenhouse is a small house made up of glass that is used to grow green plants which trap the radiation from the sun and keeps the heat from escaping which makes the house warm from the inside.
The glass of the house traps the heat from radiating back to space. The glass allows the light coming from the sun and goes through the glass but it blocks the light reflected by plants from going out. This causes the heat to be retained in the greenhouse and makes a constant temperature.