Sir Toby Belch: Is it possible?
Fabian: If this were played upon a stage now, I could condemn it as an improbable fiction.
--Shakespeare, Twelfth Night, Act 3, Scene IV
Lampshading, originally known as 'lampshade hanging' is when an author knows that something is unlikely, unbelievable, or just plain silly, and so highlights it as such.
Lampshading is traditionally used to indicate to readers that yes, this is a ridiculous situation, but I'm not trying to insult your intelligence, just play along. It can be used to handwave away a deus ex machina, remind the reader that coincidences really do happen and should be taken in stride, or simply bring the characters' reactions in line with those of the average person.
Alternatively, lampshading may be used to highlight, or make, a joke. Lampshading is a tried and true comedic device, to the point that you often see lampshading appear just for the purpose of an extra laugh, absent of any need to excuse a plot hole to the reader.
Alien: "'Ere you go. 'In memory of the 1st Planet Express ship and it's crew'."
Leela: "Hang on. It's shouldn't have an apostrophe. This means 'and it is crew'. What the hell's wrong with you?!"
Alien: "It's a minor error, lady. I mean, we're space aliens. It's a miracle we can even speak English."
-- Möbius Dick, Futurama
There is a downside the the popularity of lampshading. If an author wants to use unlikely events to foreshadow mysterious forces, an easy way to do so is to have the characters notice that something is odd. The writer is then faced with the choice of being so subtle that readers may miss the foreshadowing, so heavy-handed that it is unartful, or choose the middle path and risk their foreshadowing being mistaken for lampshading. The correct solution, in my opinion, is to leave the reader questioning whether it is a case of lampshading or foreshadowing, as keeping things ambiguous leads to more cognitive engagement on the readers' part.