tl;dr: With one notable exception, the character has never been identified on-screen as anything but "The Doctor" (nitpicker's corner: by people who are addressing him by name, and not using an alias or epithet), but has been variously identified as both "The Doctor" and "Doctor Who" if various contexts beyond the televised episodes. Nearly all fans of the show prefer "The Doctor", but even cast and crew of the show will sometimes refer to him as "Doctor Who".
--
In-universe, as everyone else has pointed out, he introduces himself as The Doctor", and those familiar with him usually address him as "Doctor" (assuming he's not trying to hide his identity by using an alias, of course). There has only ever been one, rather infamous, exception to this rule: a Season 3 episode (which I haven't actually seen, only heard about) where an intelligent computer named WOTAN calls The Doctor "Doctor Who" throughout the episode. Besides that one encounter, no one has ever directly addressed the character as anything other than "Doctor" or "The Doctor" on television.
(The phrase "Doctor Who" does come up in conversation on occasion, but as a running-joke, in the form of a question: "Doctor Who?", playing off the fact that no one knows his real name.)
The question of how to identify the character when discussing him outside of the show itself is a lot murkier. While most fans disapprove of the name "Doctor Who" for identifying the character, that's how he was billed in the closing credits for the first 18 seasons. When Peter Davison took over the role from Tom Baker, he had the credit sequence changed to identify the character as "The Doctor", which is how it appeared on all subsequent episodes until it was canceled, and on the 1996 TV movie.
When RTD revived the show, the closing credits reverted to billing Christopher Eccleston as "Doctor Who", and again, when David Tennant came in, he insisted on having it changed back. It has been "The Doctor" in every episode since then (and with Moffat being an actual fan of the show, will likely stay that way for a while.)
Cast members doing media appearances have also been known to call the character "Doctor Who" (David Tennant has done this at least twice). This is most likely done for the sake of the audience, to help differentiate the character from other random "doctor" characters (e.g. Alex Kingston was on E.R., which had lots of doctors, but not The Doctor).
According to the TARDIS wikia, the alternative media (books, comics, etc), especially the early ones, also referred to the character as "Doctor Who" in the narrative text. I don't remember this from the few novels that I've read, but those were mostly later incarnations, long after they'd settled on the character's name, so I can't confirm this personally.