At the end of the seventh episode of "The Daleks' Master Plan", on 25 December 1966, after the characters toasted each other, the First Doctor turned to the camera and said, "Incidentally, a happy Christmas to all of you at home!"
The Fourth Doctor was famous for making asides directly to the camera—but, unlike the Christmas message, it's always plausible that he's talking to himself or to another character—such as his line about not being in Hyde Park in "The Face of Evil" or "Even the sonic screwdriver's not going to get me out of this one!" in "The Invasion of Time". Other characters have had similar moments, from Tloxotl's vow to destroy Barbara "The Aztecs" to the Eleventh Doctor's "Watch me run!" in "The Snowmen".
The Twelfth Doctor, meanwhile, has a habit of talking to an imaginary audience. While this is established in-universe as him talking to an imaginary audience, it also obviously serves as him talking to the actual audience of the show. This was especially noticeable in "Before the Flood", where he told the viewer to Google the details of his explanation. In "Heaven Sent", he even said he's nothing without his audience before turning to look straight at the camera. Other characters have had moments like this as well, such as Oswin in "Asylum of the Daleks", who seems to be talking to herself, but at the end turned to the camera before saying "… and remember".
There are also "fourth-wall jokes", where the character clearly is talking to someone else, but the meaning of what they say is clearly aimed at the fans watching at home. For example, in "The Witch's Familiar", when the Doctor tells the Daleks "Now the real question is this: where did I get a cup of tea? The answer: I'm the Doctor. Just accept it.", that was aimed at fans who like to argue about continuity details. Or in "Night of the Doctor", when the Eighth Doctor tells Cass, "I'm a Doctor… but probably not the one you're expecting", that was aimed at the viewers, who'd been led to expect a Tenth Doctor special rather than the Eighth.
There are also cases where we're seeing something that was a recording in-universe, as in "Love & Monsters", where there's a "fourth-wall break" in the in-universe recording, but it's not a fourth-wall break in the actual show.
Tom Baker's narration at the start of "The Deadly Assassin" and Timothy Dalton's at the start on "The End of Time" are clearly being spoken to the viewer, but that narration presumably doesn't happen at all in-universe, much less in-character as the Fourth Doctor or Rassilon.
Outside of normal episodes, there are also cases like the Doctor giving instructions to the viewer in "Attack of the Graske", Jack in his Monster Files, the Doctor addressing the Proms audience in "Music of the Spheres", or the series prequel with Clara and the Doctor talking about each other. Most of these presumably never happened in-universe, or at least aren't direct representations of what happened in-universe (although the Monster Files may have been recorded by Jack for in-universe viewers).
In a similar vein, the Doctor Who Experience featured an interactive story where the Doctor, through various screens, talked directly to the attendees and their guide, with the attendees and guide interacting with the props and the sets as part of the story. As with the previously mentioned stories with audience interaction though, it's not clear whether (the scripted parts at least) are supposed to take place in-universe or not.
The Sixth Doctor also breaks the fourth wall in "Doctor Who and the Pirates" (Big Finish audio story), in which he wonders if Hecate is 'canonical'. Also, in "From Wildthyme with Love" (Iris Wildthyme novel), Iris spends Christmas locked up in a police station with "someone who looks like Jean Marsh". It’s difficult to tell what’s going on because the episode was junked and all that’s left is the soundtrack and some black and white snaps. The Doctor does a toast through the fourth wall, and Iris escapes through it. This refers back to the fourth wall breaking incident in "The Daleks' Master Plan".
One of the most interesting fourth-wall breaks comes not from TV, but from "Alien Bodies" (BBC Eighth Doctor Adventures novel). The Shift, an idea-based lifeform, can only interact with the physical universe by modifying someone's perceptions of another person's communications; at one point, he takes over the novel by modifying the reader's perception of the author's writing. A similar moment occurs in "Adam" (Torchwood story), where the titular character, having inserted himself into the memories of the Torchwood Team, also manages to insert himself into the opening credits, in an attempt to make it look to the viewers as well as the characters as if he was always there.