The third wall is a more recently discussed concept than the fourth. Both are examples of breaking the convention that what the audience sees and hears in a dramatic performance (TV, film, stage, radio drama, etc) are not the actors themselves, but the characters they are playing.
The more established term, the 'fourth wall' refers to an imaginary invisible wall considered to exist between the stage in a theatre and the audience. The other three 'walls' are the back and sides. An example of an actor 'breaking' this would be if they turned to the audience and said 'Macduff will kill Macbeth in a minute'. The audience will be jolted back into reality and be reminded that they are watching a play. There may be artistic reasons for doing this and the device has been employed in a number of TV, film, and stage productions.
More recently, the idea of a 'third' wall has been employed, although the technique is fairly old. It is less concretely derived, since theatrical stages already have three 'walls', but the significance is that four is one less than three. The assault on the audience's disbelief is less complete. Here, the discussion of, or reference to, the medium is confined to the actors themselves.. Breaking the third wall does not acknowledge the audience but it can become an 'inside joke' for them to share.
Examples of Breaking the Third Wall
A character in a horror film saying, “We can’t split up– what, are you
in a horror movie or something?”
Two characters fall in love in a rom-com and one says, “It’s like the
perfect ending to a rom-com.”
A character on a TV show saying, “Hm, I think that was last episode.”
Breaking the Third Wall (StudioBinder)