The common factor among Greenhouse gases is that they absorb and scatter infra-red light.
The Greenhouse effect is caused when energy coming in from the sun is prevented from escaping again. The Sun emits light primarily in the visible spectrum, with some UV and infra-red, most of which is absorbed by the Earth. This causes the Earth to heat up and in turn release it's own black body radiation, which at the temperature of the Earths surface is primarily infra-red. This outgoing radiation is the only way the Earth can cool itself, and the stable temperature at the surface is that at which the outgoing energy of Earths black body radiation exactly matches the incoming energy from the sun which is absorbed (plus a relatively very small amount released from the Earths core).
A Greenhouse gas is one which allows less of this infra-red light back out into space, causing it to be reabsorbed and raising the temperature of the planet. Similarly, any gas which primarily blocks visible or UV light has a cooling effect, since it blocks more incoming energy from the sun than outgoing energy from Earth.
Here is a paper with a very nice diagram showing off the absorption spectrum of several gasses. It's worth noting that water vapor is an even stronger Greenhouse gas than Carbon Dioxide, but since its concentration in the atmosphere is largely affected by temperature it is less concerning as a waste product we produce than it is as a positive feedback mechanism.
Greenhouse gases will have an effect as long as they exist in the atmosphere. Methane is a famous example of a greenhouse gas with a warming potential of about 30 times CO2 over 100 years, but over 20 years has a warming potential 86 times higher than CO2. The large difference over the long time period is because CO2 is very stable, but Methane has a lifetime in the atmosphere of only 12 years.
Ammonia has a lifetime in the atmosphere of only one week. The primary reason for this is the highly reactive nature of Nitrogen-Hydrogen bonds. These bonds tend to be quite weak, and are commonly found in explosives because of how quickly they decompose. I was mistaken, the primary reason is that Ammonia is highly water soluble so quickly comes down in rain, and is also readily absorbed by plants. N-H bonds are not especially weak, but Nitrogen tends to prefer to be in its extremely stable N2 state. The difference in strength between the bonds in these forms is what makes Nitrogen compounds so explosive.
Because Ammonia is so short lived in the atmosphere, it has an effective global warming potential of zero, despite absorbing the right frequencies of infra-red radiation to otherwise be a greenhouse gas.
EDIT: I should also say since you mention CFCs and Ozone in your question: CFCs are not concerning as a Greenhouse gas, they erode the Ozone layer. The Ozone layer itself has little to do with the Greenhouse effect, but instead is involved in blocking UV light which is damaging to living things on the planet (for example, causes skin cancer). Since Ozone blocks UV, it is a gas which cools rather than warms the Earth, though I am not certain how strong the effect is. I imagine not very since I've never seen it mentioned.