You and a friend are fans. You have just finished watching the latest Marvel movie, or maybe just completed reading the latest Harry Potter book, or perhaps the two of you are reminiscing about the single season of Firefly. No matter what the media (book, game, monitor or TV screen) you and your friend are suspended until the next installment comes out, and that suspense is bugging you. Then, out of the blue, your friend recommends a story to you; it's not official and it's not licensed, but it does have 4,762 'favorites'. Your friend explains that each of those faves is a fellow fan who read the story and liked it enough that they wanted others to know how good it was. You figure that, if a fav is like a share on FaceBook, then this must be decent. You're still, however, cautious.
'But, what is it?' You still want to know.
'It' is fan fiction, which (according to Wikipedia): "is fiction about characters or settings from an original work of fiction, created by fans of that work rather than by its creator. It is a popular form of fan labor, particularly since the advent of the Internet." Okay, great. But, what is it?
There are really no rules regarding fan fiction. However, an interesting pattern I've seen is in 'master' categories. That is, that many writers enjoy writing either 'fix-it' fics, speculations, continuations, or crossovers. There are, of course, standard genres such as action/adventure, horror, hurt/comfort, family, mystery, suspense, et cetera, that still pervade the flow and permeate the story, but those are different: more of a what-type-of-story than a what-kind-of-story.
Like the truth that all fiction is imaginary, but based in believable events and knowledge of how the real world actually works, all fan fiction is AU: Alternate/Parallel Universe, Dimension, or Timeline, and based on the established fictional worlds and how they work. Anything that's not canon (official and/or copyrighted), but held by a great many fans to be true, is known as fanon. Such as the mis-quote 'Beam me up, Scotty' that was never actually said in the original Star Trek series; it is still believable that it could have been said. A story may be 'canon-compliant' meaning it follows the physics and mechanics of the source material.
Below are the 4.5 categories, along with mainly-non-fanfic examples that are fairly well-known so as to help explain 'what it is.'
..ooO Fix-it Ooo..
Fix-it fics generally come in two types, though both ask 'What if ___ had(n't) ___?' and both tend to result in a butterfly effect. The first type is for detailed stories that are mostly fine as-is, at least as far as literature and story-telling go. These tend to use time travel, or simply tweak an event. A good canon example of the former is the 2009 Star Trek film, because the Romulans caused the death of Kirk Sr. resulting in James growing up without a father. It could be argued, however, that the time travel made things worse.
The other type is for vague plots that skim or hand-wave details and tend to ask 'Why?' with a bit of fill-in-the-plot-hole. This can be demonstrated by pointing at early comics, cartoons, and video games. Early comics and cartoons often would stand independent of other issues or episodes, resulting in broken stories, or story elements that outright contradicted a point made or lesson previously learned. What stories existed in video games were usually in the manuals and were simple (defeat this, rescue that). This left gaps or unexplained events that indeed needed fixing. Comics that retained longevity, and game series that continued onto consoles with capacity and capabilities for delivering deeper story, oft had to retroactively fix the continuity (or 'retcon').
In between these types are 'fixing what's not broken,' pointing at all the Batman or Spiderman movie reboots. While interesting to see someone else's interpretation, the superhero makeovers also demonstrate that one person's vision of 'fixed' will always conflict with other people's views and definitions of 'better'.
..ooO Speculation Ooo..
Speculation comes in two types: explorations of an idea/question and parodies; or tragedy and comedy. What if Shakespeare's Romeo and Juliet took place in the late 20th century? Result: 1996 film Romeo + Juliet. Still a tragedy, but easier for current generation to relate to and thus, in a way, darker. What if Star Wars was written by William Shakespeare? Result: William Shakespeare's Star Wars. ThinkGeek.com made a good promotional YouTube video (v=q0QonroBrEo) for the book that demonstrates this nicely. The former speculation type generally hangs closest to canon; most use only characters and facts from the official story. Parodies rely on the audience's familiarity with the source being parodied, otherwise a lot of the humor is lost. For another example of each, consider Treasure Planet and any Monty Python.
Subnote: Somewhere between fix-its and speculations comes the desire for deeper understanding, creating the subcategory Immersion. Fan fiction authors sometimes use this to explain why something works the way it does, to repair minor plot holes, or to expand on a theory or idea presented in the official story. The World of Shannara by Terry Brooks and The Dragonrider's Guide to Pern by Anne McCaffrey both provide extra details of their creations; compendiums. For fiction writers, knowing the details of their worlds is critical for continuity: dates and places, genealogy, climate zones and flora/fauna ranges. These details are important to dedicated fans, but weren’t in the stories when penned, and couldn’t have been without ruining the immersion or enjoyment of the plots when first read. For fan fiction writers, pulling this background to attention and devising a relevant plot or short story can be an enjoyable challenge. When done well and accepted by other fans, it becomes fanon.
..ooO Continuation Ooo..
Continuations are fill-in-the-blank prequels, sequels, and "in-between-quels": I wonder what ____ was thinking when ____ happened/was happening? What happened during that time-jump or cut-scene? What happens next? What happened before? Where did ____ come from? What was the story like from a different character's perspective? The True Story of the Three Little Pigs takes the classic children's tale and tells the tale from the wolf's perspective; that the incidents that cause the wolf to be portrayed as the bad guy, are a big misunderstanding. Disney's Tangled Ever After, a Disney Short, gives a glimpse of Rapunzel and Eugene's wedding, and tells just a little more of the story. Also, Lion King 1 1/2 for an in-between.
..ooO Crossovers Ooo..
"I wonder what would happen if ____ met ____." Crossovers, or x-overs. These are usually the trickiest to pull off in a believable scenario, unless a writer has a very good understanding of all main characters, and their personalities, preferences, quirks, and states of mind in each specific time-frame. Crossover stories are difficult to write if worlds are different; the common solution is to use alternate dimensions, planetary travel, or time travel. It takes even more skill to blend and meld two drastically different worlds convincingly without using at least one of these three methods.
These stories can be as simple as two characters meeting, or as complex as a massive melding of worlds, Alien vs. Predator being a well-known example of the first, and the Kingdom Hearts series possibly being one of the most famous of the latter. For a middling example, Archie's Comics has done two Sonic the Hedgehog/Megaman crossover events, the second bringing in guest characters from other Sega and Capcom games.
Another type of crossover lies more along the lines of elements being added (without the setting and characters) like an instant disguise – adding genetic mutation courtesy of sci-fi evil scientists, government agents, rich billionaires, or aliens – OR a fantasy wish-granting well, genie, witch, fairy, spiteful god, or dragon. The non-human character becomes human, or vice versa, and learning to cope with super powers or normality. Whether science or magic, the longer the secret is kept, the more the suspicion and suspense builds, especially with close calls. A climax can often be accomplished simply by letting one character in on another's secret. Perhaps not the best example, but in the 1996 movie Space Jam, aliens stole the abilities and skills of a handful of professional basketball players and the audience glimpsed the resulting utter confusion. A better example might be Cuphead, not for the story but for the gameplay, which can loosely be described as 'the dawn of animation meets the dawn of video games.'
..ooOOoo..
I know there are plenty of fanfics that don't fall neatly into one of these scenarios; they may be a blending of the above or on a sliding scale between. For example, the Harry Potter book Fantastic Beasts and Where to Find Them follows the Fix-It-and-Speculation-Subnote, while also being a Continuation, while the movie version is a completely different story that carries a lot of Crossover elements as it is set in New York.
Sidenote: Cookie-cutters and recolors are boring, by which I mean stories that rely on copy-paste plot and don't change at all from the source material. Book-to-movie type of productions can get away with this, as the form of presentation is completely different. For a loose example, imagine that the anime version of Pokemon followed the pattern of the games, with two versions but with a few different creatures. In this example the only changes would occur when one of the version-exclusive Pokemon showed up, and even then those changes would make a negligible difference in the overarching plot of the season or series. I think some of the re-re-remakes of certain superhero movies fall prey to this a bit.
As a final note, I would caution aspiring writers to be careful of changing what makes an established character who they are without believable in-story explanation or reasoning. Also, please use warning tags. In a similar way, I would caution readers; If you don't like the way an author portrays your favorite character, you have no obligation to continue reading.
Fiction is the dreamer's mind, imagination interpreted by paper and ink. Fan fiction is no different, and, to borrow a popular method of fanfic disclaimer, just plays in someone else's sandbox.