Professor was a title given to scholarly teachers to denote their academic ability. It was often, though not exclusively, given to those who had achieved a certain level of learning of held a position that earned them the title.
Ace often referred to the Seventh Doctor as "the Professor" throughout her early association with him (TV: Dragonfire) and still continued to refer to him as 'professor' in a friendly manner several years later. (PROSE: Happy Endings) This may have been in reference to the fictional character Professor X.
Professor Marius, who built K9 and later gave him to the Fourth Doctor, was a specialist in extraterrestrial pathological endomorphisms (alien viruses) at the Bi-Al Foundation in the year 5000. (TV: The Invisible Enemy)
River Song introduced herself to the Tenth Doctor as a professor of archaeology. She was not yet a professor at the time of the crash of the Byzantium. (TV: Silence in the Library, The Time of Angels)