People who tell you that the greenhouse effect has nothing to do with greenhouses,
will tell you that in a greenhouse, the glass windows cut off heat flow caused by air exchange between the inside and the outside of the car. They will also tell you that cutting off the air flow is not what happens in the greenhouse effect. This is the default statement.
What happens in a greenhouse is the same mechanism that heats a car up when you close the windows. The sun’s light (radiation) shines through the glass. The light energy checks in, but it can’t get out because both air flow (most important) and conduction are closed off. The fancy name for air flow is convection. We might fall into the habit of using that below.
That leaves radiation. The wavelength of radiation emitted from a surface depends on the temperature of the surface according to a formula first derived by Max Planck. It turns out that the emission from the sun is peaked in the green which can pass through the glass windows, but the radiation from surfaces at 300 C is peaked at much longer wavelengths in the infrared (IR), which is absorbed by the glass.
The IR radiation inside the car can heat the air inside the car, but, because it is adsorbed by the glass windows and the metal, it cannot get out. OTOH, the surface of the car and the glass is heated from the inside by radiation, conduction and convection.
The surface, in turn, can radiate heat away, but, because the glass has an inside and an outside, half of what is radiated goes back into the car and half out into the air. In short, for cars with closed windows and greenhouses, at first, the rate of radiation into the car exceeds the rate of radiation out of the car and other heat transfer processes are pretty much cut off.
There is another radiation law called the Stefan-Boltzmann law, which says that the rate of emission for radiation from a hot surface is proportional to T^4 , (which is T*T*T*T, T being the temperature in Kelvin) so if you heat something up a little, the total amount of energy emitted goes up a lot.
The sun pumps energy into the car at a constant rate. The temperature of the car increases until the surface is hot enough that the energy radiated from the surface per second exactly equals the energy pumped in by the sun. You get one hot car.
With all that in mind, let us talk about the atmosphere.
Again, the sun is the only real source of energy. Heating from the core of the earth is very small by comparison, but that is another story. The emission rate of radiation to space has to equal the rate at which the sun’s radiation reaches the earth. This is called radiation balance. If radiation balance did not exist, the earth would heat up until the surface was hot enough to emit enough energy to restore the balance.
If there was no greenhouse effect, the emitted IR light from the surface would all escape to space. The temperature of the surface necessary to emit enough energy so that the earth would be in radiation balance under those conditions is about 256 K or ~ -17 C. However, some of the light emitted from the surface is absorbed in the atmosphere by the greenhouse gases or clouds. That heats the atmosphere, but it also means that the molecules in the atmosphere will radiate. At the lowest level of approximation, which is good enough for this argument, half of the radiation from the atmosphere escapes upward to space and half is emitted downward to heat the surface. If you want more details google radiation balance.
Since not all of the radiation from the surface escapes to space when there are greenhouse gases, the surface has to emit more energy so that the amount of energy escaping to space per second equals that striking the earth's surface from the sun. In order to emit more energy the surface of the earth has to heat up. That is the greenhouse effect.And that is why the greenhouse effect both is and is not similar to a greenhouse. The atmosphere is not like a blanket, but it is like the glass in the greenhouse, or in your car.