1. In Green House,some plant are kept which require sufficient heat. This is done by trapping the sun radiations which are reflected by the surface of plants.
2. The same is done by the Earth. The heat from the sun is reflected by Earth's surface,and is trapped by some gases such as CO2. Thus,same as green house,so it is called as green house effect.