Climate is the statistical distribution of weather. Thus it is easier to predict than weather itself. Similarly, if you flipped a fair coin 1 million then we can expect with extremely high probability that roughly 50% of the coin flips would be heads. However, we would have no ability to predict an individual coin flip (weather).
Objects tend to emit electromagnetic radiation depending on how hot they are. I emit radiation, you emit radiation, the sun emits radiation, the earth emits radiation, etc. There are different types of electromagnetic radiation including x-rays, gamma rays, ultraviolet light, visible light, infrared radiation, microwaves and radiowaves; what distinguishes these types of radiation is the frequency (i.e. colour) of the radiation. The hotter something is, the more electromagnetic radiation it will emit (unless we are dealing with radioactive materials, which is another issue) and also the higher the frequency (i.e. more blue/violet and less red) the radiation will be.
The Earth emits electromagnetic radiation, however because the Earth isn't very hot, this radiation is infrared and we can't see it. The sun, is much hotter than the Earth so it's radiation is primarily visible light, which we can see. Ever turn on an electric stove and notice that it starts to glow red as it gets hotter? This is the relevant effect.
Different types of gasses have different properties. Some gases might be completely transparent to some types of radiation, but opaque to others. By opaque, I mean that the gas will have a high chance of absorbing a photon of light if the light tries to pass through the gas. The reason for these properties is due to the properties of the individual molecules in the gas, but to explain these properties you have to go into quantum mechanics. Greenhouse gases for Earth are those gases that are transparent to visible light yet opaque to infrared radiation. CO2 is a good example, because if you look at the properties of CO2, it is very transparent to visible light.
CO2 tends to absorb infrared radiation around 15 μm very well. When you add more CO2 to the atmosphere, this will not really affect light traveling from the sun to the Earth, since that light tends to be visible; thus the light from the Sun will pass through the atmosphere and warm the surface. In order to cool-off from receiving all this energy from the Sun, the Earth must radiate energy out into space. The surface of the Earth emits infrared radiation which travels towards space. However, if we add more CO2, then there is a higher chance that this energy won't reach outer space and will instead be absorbed by the atmosphere. The atmosphere will then re-emit some of that absorbed energy back towards the Earth's surface. The net effect is that the Earth's surface warms.