Some atmospheric gases allows sun light to enter the planet but does not allow the reflected infra red rays to get out.So heat is trapped in the atmosphere.
On Venus we have maximum green house effect.That is why its surface is 480 degree C hot more than Mercury. Green house gases.carbon di oxide, Methane. water vapor etc. Picture credit astrocamp school.org.