Some people compare modern kayfabe to Penn & Teller's tricks which seem to give away the magic's "secret", while actually setting you up for a different, more impressive effect.
Kayfabe can be heavily bent, if not outright broken, by a Worked Shoot.
Other kayfabe-breaking incidents have occurred during live broadcasts, with the announcers outright referring to "wrestling angles" and "storylines", perhaps most notably the off-camera accident that killed Owen Hart during a pay per view broadcast, forcing the announcers to explain what had happened. Mc Mahon had to explain that pro wrestling was a "sport", and therefore avoid having real sports governing bodies from investigating.
(Not that he didn't have legal issues surrounding steroids.) "Breaking kayfabe", for a pro wrestler, is tantamount to "breaking character" for an actor.
"Kayfabe" is a carny term thought to have originated from the Pig Latin for "be fake", possibly originally by pronouncing it backward ("kay-feeb").
Professional Wrestling adopted the term as a reference to the standard Fourth Wall features of separating the audience from the action.
Back in the old days, though, kayfabe was much more; it was pro wrestling's real life Masquerade.
Wrestlers, promoters, and everybody else involved with the business alike resorted to any means necessary to guard the secret that wrestling was rigged, from wrestlers roughing up any reporters who dared ask, "It's all fake, right?
There are even rumors that some wrestlers would lie under oath in court to maintain the illusion, and some old-time heels tell stories about carrying guns for their own protection from those fans who took it just a bit too seriously.
We know that movies and TV shows are "fake" too, but a well told story, particularly one with lots of action, is well received regardless.
For another kind of fiction pretending to be real, see Direct Line to the Author.
To get an idea of just how important kayfabe was, it's interesting to watch shoot interviews with old-time wrestlers filmed in the modern era, even decades later when everyone knows that wrestling is fake, they often start speaking as if various angles and feuds were real and tend to dance around actually saying that wrestling is staged if pressed (Arn Anderson, now a backstage agent for WWE, is notorious for this).
Naturally, there had always been skeptics that denied pro wrestling's legitimacy from the beginning , but fans widely started to figure out the truth in the '70s (if indeed they ever really didn't know before—with any live TV audience there is a certain amount of kayfabe of a sort going on with them too), and once Vince Mc Mahon's World Wrestling Federation rose to prominence in the '80s, the secret was out for any but the most die-hard (and thick-headed) fans.