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 or 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, et al.) and still continued to refer to him as "professor" in a friendly manner several years later. (PROSE: Happy Endings)
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. (TV: Silence in the Library) She was not yet a professor at the time of the crash of the Byzantium, although the Eleventh Doctor accidentally let slip that she one day would be. (TV: The Time of Angels) She was forced to "kill" the Doctor almost immediately after receiving her doctorate. (TV: Closing Time) After she was pardoned for his "murder", she returned to Archaeology and became a Professor. (TV: The Angels Take Manhattan) She seemed to prefer to be called Doctor Song rather than Professor Song as Nardole stated that she was only "sometimes" called Professor. (TV: The Husbands of River Song)