Yes, CO2 is a 'greenhouse gas'.
All atoms and molecules absorb photons, increase their energy as a result (excitation) and release that energy back in the form of photons (emission). With a single atom, the photon energies it can absorb depends on how its electrons are configured, how strongly bound they are to the nucleus and so on. For molecules, the shape becomes important. They can rotate and twist and vibrate when absorbing those photons.
If you take O2, for example, it has two oxygen atoms in a linear shape. You can imagine, on absorption of a photon, it could spin around or it could lengthen and shorten, or maybe one oxygen could wobble up while the other wobbles down. It has a certain number of rotational and vibrational modes. If you have more complicated molecules, like CO2 or H2O, these have more rotational and vibrational modes because with more atoms in the molecule, you have more ways to distort it! The interesting thing is that if you imagine different ways of spinning and vibrating something in 3D, then some spins and vibrations are equivalent.
If I take an O2 molecule and spin it around the X axis, this pretty much looks the same as if I spin it in the Y or Z axes. But something like H20 will look very different because it has a big fat oxygen atom and two small hydrogen atoms like splayed feet. Spinning it around one axis doesn't look the same as another and this lack of symmetry in rotating it means it has extra modes.
Molecules like CO2 and H2O have vibrational and rotational modes that aren't activated by high energy UV or visible photons, but are excited by lower energy infrared or even microwaves. They absorb infrared and re-emit infrared. But the direction of absorption and emission are different. A photon being absorbed in one direction will lead to a photon being emitted in another direction.
So, infrared photons being emitted by the warm surface of the earth will be absorbed by gases like CO2 and emitted in all directions with about 50% ending up heading back towards the earth rather than out in space. An atmosphere containing these gases reduces the net flow rate of energy from the earth into space compared to an atmosphere without them. That means the planet must warm.
The temperature of the earth is the temperature at which the energy being radiated and reflected into space matches the energy recieved from the sun. The more CO2 we add, the warmer the planet has to get to balance the energy being redirected due to those vibrational and rotational modes.