I suppose both the doctor and professors have earned their Ph.D. However, does "doctor" and "professor" are completely different terms?

Native speaker’s answer
Rebecca
A "professor" is a higher rank than a "doctor" in academic institutes. So a "professor" might have a doctorate, but you wouldn't necessarily call them "doctor". The professor in the Power-Puff Girls teaches quantum physics at a research centre. I have had a few teachers who were not medical doctors, but since they had a doctorate, they wanted us to address them as "doctor". Ex: The professor liked the presentation I gave on physics the other day in class! Ex: I have a doctorate in chemistry, but you don't have to call me doctor.