The ozone layer has very little to do with global warming, but it is one of the less important "greenhouse gases". The importance of the ozone layer is in protecting us from excessive solar ultraviolet radiation. We are much better off because it is there. For several decades, it began to disappear because of the addition of certain man-made chlorofluorocarbons to the atmosphere. We are on the way to solving that problem, by changing what we put in aerosol cans and air conditioners.
The greenhouse effect is the warming of the Earth due to the presence of certain gases in the atmosphere (H2O, CO2, CH4 and O3)that absorb infrared radiation so that it cannot be reradiated back to space. There is nothing we can do about the H2O, so we live with that. The atmosphere has humidity becasue we have oceans. The big problem is CO2. It absorbs a lot of the infrared radiation in a band all by itself, and the amount of that absorption is growing becasue the amount of CO2 is steadly going up as a result of human activity: fossil fuel buring and deforestation.
Global warming is believe by most be strongly influenced by increasing levels of greenhouse gases, especially CO2. That is the contrversial part. some scientists believe that the observed global warming of the last 100 years (about 0.8 C or 1.5 F on the average) is due largely to increased CO2. Some believe that increased light output from the sun may have caused most of the observed effect.
Your teacher is right. The greenhouse effect is not controversial. It is a straightforward energy balance. Absorbers are present in the atmosphere, and they act as a "blanket" in keeping energy in.
So, are the greenhouse effect and global warming related because CO2 with the greenhouse effect absorbs too much heat which causes global warming?