CO2 is transparent to visible wavelength radiation but opaque to infrared radiation. Visible wavelength light from the sun is absorbed by the ground then re-radiated as IR waves. CO2 absorbs this IR radiation (preferentially from on direction - below) and re-radiates it another direction (unpreferentially). Overall this increases the amount of radiation and thus heat bouncing around in our atmosphere.
If the CO2 wasn't there the radiation would continue into space. Atoms and molecules can only absorb specific quanta of energy. I assure you this is well understood but I can point you to the relevant literature if you like.
The role oceans play in short-term climate variation (El Nino, La Nina, ENSO, PDO, etc.) is a subject of continued study and debate, I'll give you that. But regardless we're building up heat in the earth system via the greenhouse effect and it is quantifiable.