Earth's atmosphere behaves like a gigantic greenhouse. Greenhouses gases include carbondioxide, water vapour, methane etc. The reason behined their name is that they cause an effect same as a traditional greenhouse.
These greenhouse gases accumulate in the earth's atmosphere and form an invisible blanket like layer. This layer traps heat within atmosphere similar to how glass walls trap heat in a greenhouse.The layer allows the sun's high intensity radiation to pass through it to the earth's surface where it is absorbed and reflected back in the form of heat.Some of this heat is absorbed by the greeen house gas layer and causes the layer to heat up and reflect some of the heat back toward the atmosphere. This is green house effect.