The greenhouse effect occurs when gases such as methane, carbon dioxide, nitrogen oxide and CFCs trap heat in the atmosphere by acting as a pane of glass in a car. ??The glass?? lets the sun light in to make heat but when the heat tries to get out the gases absorb the heat.