(written from a Production point of view)
Fan fiction is a name given to any fictional story or material based in and around the Star Trek universe, that is not produced with the input of the creators or licensees who create new Star Trek material for Paramount Pictures. Although the most common form is in prose, similar to the various novels, it can also come under the form of scripts, poetry, reference material, games, audio recordings, and films.
It is illegal to buy or sell "fan-produced" memorabilia for profit, due to the copyrights of the name Star Trek, in addition to the copyrights of the major names involved, being owned by Paramount. Despite this, some fans take it upon themselves to create their own versions of Trek on a "not-for-profit" basis.
A related concept is "fanon", a contraction for "fan canon". Fanon is a belief held by fans that is not canon. Fanon can range from discounting part of Star Trek as non-canon to making up a explanation for unexplained inconsistencies such as the differing appearance of the Trill.
In the early days of fan fiction, the easiest way for fans to read, and circulate, their works was through fanzine or folios. Some of these fan productions were even used in Star Trek productions, such as pages of fan-published reference manuals being used on screen as background artwork, and some were created by authors who went on to work on legitimate Star Trek productions. Paramount has even supported the professional publication of fan fiction through their The New Voyages, The New Voyages 2, and Strange New Worlds series of books.
Franz Joseph was one of the first to publish fan reference material starting in 1973 when he created and published his blueprints Booklet of General Plans – USS Constitution-class for the USS Enterprise. His blueprints were used in a number of the early Star Trek films. Other creators that began with fan publications include Rick Sternbach, an illustrator for Star Trek: The Motion Picture and the spin-off series, and Geoffrey Mandel, a scenic artist on Star Trek: Voyager, Star Trek: Enterprise, and Star Trek: Insurrection.
Kirk, Spock, and the creation of Slash Edit
The friendship between Kirk and Spock created a subculture of Star Trek fans who believed the relationship between the two to be not merely platonic, but explicitly romantic – in 1974, the short story "A Fragment out of Time" by author Diane Marchant was the first explicitly sexual fanfiction piece featuring two men to be published in a fanzine, although they were not mentioned by name. In the next edition of that fanzine, Marchant confirmed that the two men were Kirk and Spock and wrote an essay defending the pairing.
Gene Roddenberry's novelization of Star Trek: The Motion Picture revealed that Spock thought of Kirk as his "t'hy'la", a Vulcan word meaning "friend/brother/lover." When asked about this possibility, the actors and Roddenberry neither confirmed nor denied this interpretation. Gene Roddenberry, when interviewed for the authorized William Shatner biography Shatner: Where No Man..., was asked about comparisons between Kirk and Spock and the historical relationship of Alexander the Great and his friend and sometime second-in-command Hephaestion, two men widely believed to have been lovers. He replied:
- "Yes, there's certainly some of that, certainly with love overtones. Deep love. The only difference being, the Greek ideal... we never suggested in the series... physical love between the two. But it's the... we certainly had the feeling that the affection was sufficient for that, if that were the particular style of the 23rd century." (He looks thoughtful.) "That's very interesting. I never thought of that before." (Shatner: Where No Man..., p. 148)
The notion of "slash" as a genre – or the idea that certain relationships between two men or women in popular films, television shows, and literature are subtextually homoerotic – has since spread to fans of other entertainment media.
Another major concept that originated in Star Trek fan fiction was the idea of a Mary Sue. This was an original character, stereotypically an adolescent girl, written as if it were an insertion of the writer in some sort of wish-fulfillment fantasy. A Mary Sue character would often be exceptional in many ways, have Kirk, Spock and/or McCoy fawning over her, and save the day in some unrealistic way. In short, she would just implausibly have everything going for her and be the center around which the whole ship revolves.
The name originated from the short parody story in the fanzine "Menagerie", "A Trekkie's Tale" . Writer Paula Smith had observed the trend towards including such characters in fan fiction stories, and stirred up considerable sentiment with her lampshading of the phenomenon. Contemporary opinions on Mary Sue characters ranged from not seeing anything wrong with it to passionate hate. When deliberately invoked, the concept is subject to ridicule. One contemporary example would be the webcomic "Ensign Sue Must Die!".
The term remains widely known to this day and has spread far beyond Star Trek fan fiction circles, to all kinds of fan fiction and regular fiction. The definition of what constitutes a Mary Sue is very fluid, and has sometimes even be used to decry strong and capable characters intended to be likable but not received as such.
The concept came full circle when Wesley Crusher became criticized for being a Mary Sue by some, because, among other things, he was serving on the Enterprise at an unusually young age and shared Gene Roddenberry's middle name.
Fan films and games Edit
One of the more recent phenomena in fan fiction is the fan film. These films vary in length from short clips to full episodes, some even comprising of several seasons of episodes. In the past, production technology and cost were major limitations to amateur projects, but in modern times, films can be distributed cheaply via the Internet, and convincing visual effects can be created using home computers. Some of these productions are popular enough to have some production staff lend their support.
Some fan-produced games have joined into licensing agreements with Paramount including Star Trek: A Call to Duty and the Star Trek Simulation Forum. The Simulation Forum was created in 2002 as the official chat based role-playing game of StarTrek.com, but had lost its official affiliation by late 2007.
In the mid-1970s, Star Trek Lives! was published by Bantam Books documenting the fan culture around Star Trek. In the late 1990s, a film, Trekkies was released documenting the fan culture twenty years later.
Paramount and CBS have tolerated non-profit fan films, but view for-profit fan films as an infringement of their copyright. As of late 2015, non-profit fan films were still permitted, but CBS filed an injunction against the film Star Trek: Axanar, which paid its producer with funds generated from crowdfunding.  Star Trek Beyond director Justin Lin expressed outrage at the lawsuit, with J.J. Abrams later announcing the case would be dropped and that CBS and Paramount were working on a new set of guidelines for fan films. 
On 23 June 2016, StarTrek.com announced fan film guidelines in a short letter to the public.  Axanar producer Alec Peters responded the guidelines were too restrictive, effectively canning the project due to the limits imposed on fan film running times and budgets. The lawsuit remains pending.