Fanon is a "fact" or ongoing situation related to television programs, books, films, or video games that has been used so much by fan writers or among fandom that it has been more or less established as having happened in the fictional world, but which does not appear in any official work from the original authors, scriptwriters or producers. Fanon is a portmanteau of fan and canon.
The term is sometimes used pejoratively by purists to refer to such explanations as faulty or illogical given the nature of a story, or "common lore" copied amongst fans, especially in webpage proliferation, that actually contradicts a simpler explanation that was even alluded to in canon. This is especially common for foreign works, resulting when they are mistranslated or when backstory and exposition elsewhere in a work has not been ported over (for example, manga that was associated with a commercial anime, but of which only one has been translated).
Fanon is sometimes well-known by creators and may even be accepted as true (or at least as a reasonable explanation) to something they have not explicitly explained. On the other hand, some creators of serial works introduce facts in subsequent installments of their work which invalidate specific fanon.
In a series with a substantial expanded universe (official, but not necessarily canon, additions to the series proper), such as the Star Trek expanded universe, elements of fanon sometimes become established as part of the expanded canon; this is particularly common when fans become contributors to the expanded universe.
A variation of fanon is "personal canon", which is a set of "fanon"-like facts that are accepted as canon by an individual fan or a group of fans. Proponents of "fanon" or "personal canon" have been known to be offended when these terms are used, as "fanon" facts have often become better accepted than canon. This is widespread among Star Trek fans; for example, Star Trek: Enterprise is rejected by many Trek fans on the basis that it violates "fanon" regarding the history of the Federation (rather than canon facts seen on earlier series). Similarly, some Trek fans have also seen fit to reject and "decanonize" individual episodes or films that don't fit with their vision of the Star Trek universe (or, alternately, the perceived vision of Star Trek's late creator, Gene Roddenberry). Some consider such a selective view elitism, or simply an egotistical way to label stories one simply didn't like very much. Most recently, many Star Trek fans have indicated that they choose not to accept the finale episode of Enterprise, "These Are the Voyages", as canon, for reasons ranging from anger over the fate of a major ongoing character to the fact that it was written by the series' unpopular creators to the perception of the episode as being insulting to fans of Enterprise (a perception shared by some of the Enterprise cast members).
Fanon can also be true for one version of the story, but not in another. For instance, fanon for a Japanese anime and manga series may be true in a manga version of a series, but not an anime version of a series, or vice versa.