Retcon is something that occurs sometimes in series and franchises which take place in the same continuity. This happens in a book series or TV series when something is mentioned (or not mentioned) in Book 3, for example, (or Season 3, etc.) that seems to contradict the continuity of an earlier book/episode. For example, in Book 1, a character has two brothers, and they mention only having two brothers, but then in Book 4, a never-before-mentioned third brother appears, and everyone seems to know him.
Sometimes we see the opposite where a sibling (or other character) disappears without an explanation, and it's as if they never existed. This is called the Chuck Cunningham Syndrome named after the forgotten Happy Days brother. Other examples of this include Tiger in The Brady Bunch, Judy in Family Matters and a lot of characters in Doctor Who....
Soap Opera Rapid Aging Syndrome could also be considered a retcon, which is common in television series and sometimes movies, but probably rare in books, since the reason is to replace the child actors with older actors. (Cartoons like The Simpsons and Rugrats could be considered the reverse.)
Another type of retcon can occur not from exact contradictions in continuity, but from introducing an object or character in the franchise that was never mentioned before, where the opportunity could have allowed a mention, but it didn't because the writers probably didn't know about it yet.
A television example of this would be in Mighty Morphin' Power Rangers Season 2. In the season premiere we're introduced to Lord Zedd, the superior to Rita Repulsa. (He was introduced as a new villain because they were out of Japanese footage and were replacing it with original footage, which explains why Rita was later replaced by a different actress, although her voice was the same.) The reason this feels like a retcon (even to children who saw it like myself) is that not once in all 60 episodes of Season 1 was there ever any mention of Rita having a superior leader (and later we'd introduce more villains that were part of an even larger villain group in the galaxy led by Dark Specter)... Also the fact that Rita was trapped in a dumpster for 10,000 years also adds to the retcons, especially when her brother and father are added in Season 3. (The movie with Ivan Ooze is not considered a retcon, since it took place in a different continuity despite having most of the same cast from the series.)
Once Upon a Time has been pretty good at keeping up with continuity for the most part where little has ever contradicted... despite a number of characters who have shown up having never been mentioned before. Still there have been a number of Chekhov's Gun examples (which is one way to avoid the accusation of retcons...) Many retcon issues have been explained by memory magic, for example, Emma's relation with the Snow Queen or Regina and Zelena's childhood experience. One of the biggest times I felt retcon was in the Season 4 episode where Robin Hood has a history in Oz with Zelena. The reason this feels a little like a retcon is that a year earlier Robin and Regina were having dialogue about what to do with Zelena, and I don't remember him ever saying that he had met the Wicked Witch. Technically I don't think he ever said that he didn't know her, but the fact that he didn't mention it, when there would have been an opportunity is what seems to mess with the continuity.
I'm not even going to go into examples of retcon from Doctor Who, which has existed for so long that it's bound to happen...
(Not necessarily retcon... but Captain Kirk seemed to violate the Prime Directive in the original Star Trek series.)
Now when it comes to books... I haven't experienced this as much with books which take place in the same continuity, although the Oz books come into mind (I know, first Once Upon a Time, and now this, I have a habit of bringing up Oz, and this probably won't be the last.) The Wicked Witch was rarely mentioned in later books... fair enough since she only appeared in one chapter and was only mentioned a few times beyond that... but the Good Witch of the North basically disappeared from the continuity. Without giving away specific spoilers, there were also retcons made involving the Wizard and Ozma.
In my own writing, I have tried to deal with this. If I know that a character has an unseen sibling or a cousin, I don't want to wait too long to mention this. (Although that doesn't mean it has to be a gratuitous mention, but at some point I do need to think about the reasons for why related characters are absent.) This is why it can be a great advantage to think ahead while revising the draft of a novel. The Face of the Pumpkin is written as a standalone book in which all the major plot points are resolved in twelve chapters. However, that doesn't mean that I didn't include information that was both relative to the characters and that story that may have also been a Chekhov's Gun/Boomerang for later stories. (I also may or may not have written most of the first draft of a sequel...)