tl;dr There’s no rule, traditionally Professor is “higher” but not all faculty feel that way, not all faculty are professors and/or have PhDs, it’s all very, very complicated, but generally either is safe. I go with Professor.
You have no idea how complicated this question is to answer. Read on, MacDuff:
This is based on extensive experience as an undergraduate, grad student, and faculty member at many US colleges and universities. This only applies to US and Canadian universities. I’ll use my name as an example.
The title Doctor is awarded to anyone with an earned doctorate (except Juris Doctor, JD, which is a law degree). Commonly granted doctorates are the principal research degree of doctor of philosophy (PhD), doctor of medicine (MD), doctor of dental surgery (DDS) or doctor of medical dentistry (DMD), doctor of psychology (PsyD), and doctor of education (EdD); some schools grant doctor of science (DSc) instead of the PhD, but others (particularly in Europe) use that degree for other types of education or as honorary doctorates. I say earned doctorate because schools often award honorary degrees, typically doctorates (but not typically PhDs, MDs, PsyDs, or EdDs); your commencement speaker probably was given one. People who have only an honorary doctorate are not entitled to use the title, but some do, as this is custom and culture, not law. I’m deliberately leaving out religion/religious doctoral degrees like Doctor of Divinity (DD) and Doctor of Theology, since most of these are earned by clergy who use their clerical titles (e.g., Father Gross or Father Joshua for a Catholic priest); in an academic or formal context, these would typically be written as Doctor Gross (if not clergy), Father Gross, DD, or the Reverend Doctor Gross, depending on specifics.
In formal written contexts, those with earned doctorates should be first addressed as Joshua B. Gross, PhD (substitute the appropriate doctorate), Professor Joshua B. Gross, or Doctor Joshua B. Gross, and subsequently as Professor Gross, Doctor Gross, or Dr. Gross, as appropriate. Never refer to anyone with both title and degree suffix, such as Doctor Joshua B. Gross, DDS (people do, but it’s considered tacky and is wrong). While someone with an MD and a PhD could technically be referred to as Doctor Joshua B. Gross, MD, it’s not done; to use both degrees, makes them suffixes (Joshua B. Gross, MD, PhD or Doctor Joshua B. Gross). Additional degrees can be added as suffixes, from most to least advanced, so I might be Joshua B. Gross, PhD, MS, BA, but this isn’t necessary and is rare with some exceptions. In listings with other people who have doctorates, people should have their highest degree added as a suffix, so “the chairs are Joshua B. Gross, PhD, and Jane Smith, MA.” Again, this is only in formal written contexts. For some bizarre reason I have never had adequately explained (beyond “it prevents people from thinking you are a medical doctor”), Associated Press style (used by newspapers and magazines) is to refer only to medical doctors with their title; those with other doctorates and/or professorships don’t rate a title or even a degree suffix. Oh, and as for periods, ugh, seriously, they don’t matter; just be consistent.
Lots of people have doctorates. Many psychologists have PhDs or PsyDs, although some people with other degrees (commonly a master of social work, or MSW) are called psychologists (which pisses off some doctoral psychologists). Obviously, we hope that your surgeon has an MD and that your dentist has earned a DMD/DDS before drilling into your teeth. Your high school principal might have an EdD. Any of these people have the right to be called Doctor, although they might not use it.
To be a professor is traditionally a step beyond an earned doctorate (although there are professors without earned doctorates, particularly in community colleges), but we have to state what we mean by professor. Some assert that anyone teaching at an institution of higher learning, from a community college to Harvard, should have the right to use the title Professor, even if their job title is Lecturer, Instructor, or something else, even as an adjunct (faculty with no permanent appointment at the school, some are part-time). Others consider that only those who are actually professors (by job title, including assistant, associate, and full professors) have a right to the title Professor. These people usually prefer being called Professor, and in unquestionable terms, they have a right to that title and it is higher than Doctor. I don’t doubt Dixie Golden’s experience, but it’s atypical. I have never seen any of these faculty harangue someone for calling them Doctor, but they will correct that person.
Now, for the nontechnical and most relevant answer, the dominant issue is the institutional culture. At my school, where virtually all faculty have doctorates and the title of Professor (we don’t have ranks, and have very few adjuncts), faculty go by their first name or the title Doctor, but never Professor. I have no idea why, but it doesn’t bug me. I honestly don’t care what students call me, as long as they treat me with the same respect I give them and appropriate deference; however, everyone in my department prefers to be called Doctor, so I go along so as to not make waves and confuse students. We even commonly refer to one another as Doctor when speaking with students. At a prior school I was at, we had a pool of lecturers, of which I was the only one with a doctorate. The heads of undergraduate studies in the programs in the college did not have doctorates, either. The culture of the school was traditional (this was in the south), and as a result students called all of these people Professor (just like the rest of the faculty), even though they had no “right” to the title. It’s all down to culture.
However, regardless of her degree or title, unless she specifically asks you to do so, do NOT call a woman faculty member Misses (Mrs.) Gross or Miss Gross. Some won’t care, but others will get upset for reasons having to do with the amount of disrespect women faculty get from and relative to men faculty. Generally, men with doctorates and/or who have the title of Professor don’t like to be called Mister (Mr.) Gross, but there isn’t the same context of issues.
When in doubt, calling a faculty member Professor is not going to cause offense to anyone, even if they aren’t professors. The worst you might get is, “hey, call me Josh,” while if you call someone Josh when they want to be called Professor Gross, they may launch into a tirade.
Many people ask the related question of how to know when to call a faculty member by their first name, and I recommend always waiting for an invitation. Most will say at the beginning of the first class, “Hi, I’m Professor Gross, but you can call me Josh.” Another clue is how they sign email; if they sign it “Josh”, you’re probably safe to call them Josh, and if they sign it “Herr Doktor Professor Doktor Friedrichsteingeldschmidt”, yeah, best to call them Professor (and yes, Germans do use all titles in formal contexts). If they don’t prompt you to call them by their first name, even when you address them by a title, stick with the title.
A few special notes:
- Postdocs have no special title in the US (other than Doctor), even though most are actually titled Postdoctoral Fellows
- It’s appropriate to refer to graduate students, even your instructors, as Mister Gross or Ms Gross, unless you are invited to refer to them by their first name (which most do); again, though, you won’t get yelled at for promoting them to Professor Gross or Doctor Gross
- Grad students, especially doctoral students, often call faculty by their first names, but this isn’t an absolute; some faculty want to reserve that privilege for when the student finishes their doctorate
- In formal address, even those with doctorates and professorships should refer to their peers as Doctor or Professor, but informally this usually falls by the wayside
- For heaven’s sake, never begin an email to a faculty member with “Hey,”, “Dude,” or “Hey dude,”; I’ve never met a faculty member who would be OK with this, even if they don’t react, and it usually means your email will be read with a cynical eye (EDIT: Jeff Erickson has indicated below that he’s ok with this; I’d still discourage students from starting with this level of informality)
- Faculty with qualified professorships like Research Assistant Professor, Associate Teaching Professor, or Visiting Professor, are entitled to the title Professor
- Some faculty are called Doctor G (their last initial) or Professor G, often those who have long and/or hard to pronounce names, but this should only be done at the prompting of that faculty member
Long-winded answer, but hey, I’m an academic, what do you expect? Besides, it’s a complex topic. Again, that’s academia.