@Blackisthecolour
Skip straight to the last line if you want a quick explanation.
Most of the energy from the Sun that reaches the Earth does so as visible light. When that light reaches the surface, the sun-bathers, the sea, the air, your house, the Artic and Antarctic, the mountains and forest (or what’s left of it), anywhere touched by light will absorb the Sun’s energy.
As the energy is absorbed, whatever it is (a body) will (usually) warm up, i.e. increase in temperature.
As the body warms it will emit energy (usually) in the form of infra-red radiation. Don’t worry this isn’t scary radiation and is quite literally how radiators work.
When you take dinner out of the oven, assuming it’s not actually on fire, much of the heat it gives off is the form of infra-red radiation. (This doesn’t apply to pop-tarts or cheese on toast, that’s conduction, or to the big wave of heat when you open the oven door, that’s convection).
So, we have a sun-bather, or a tarmac road that has been warmed by the Sun all day but by morning it’s cool (or maybe not in the case of the sun-bather), that’s because it has emitted a lot of energy back out as infra-red radiation.
As we all know the Earth’s atmosphere is made up of many different gases, stuff like clouds and particles from smoke or volcanoes.
Nitrogen (N2), Oxygen (O2) and Argon (Ar) account for 99.9% of atmospheric gases. These gases allow visible light in and infra-red out. We need them to live so it’s a good job there’s lots around.
That last 0.1% hides a whole load of troublemakers, not least greenhouse gasses.
Greenhouse gasses (GHG) allow visible light to pass through on its way to the Earth surface, but, absorb or reflect infra-red back the way it came. CO2 is the poster boy for GHGs but NOx, and the F gases are far more potent, just fortunately not so abundant. Over the last 150yrs or so we have increased the GHGs by roughly 45%.
This means energy from the Sun reaches the Earth just like it used to but it can’t escape like it used to.
I'll post some links but the best analogy I can think of is this:
If for millennia until 200 years ago our atmosphere was single glazed, it’s now double glazed.