Fanfic or fan fic or fan fiction -- stories written by fans using someone else's world. For example, lots of kids write their own Harry Potter fanfic stories.
Readers and writers of fanfic often ask about the legality of writing stories using media or book characters.
IN A LEGAL SENSE, fanfic is a copyright violation, but the owner of the copyright can choose to ignore it or prosecute it at their discretion.
The essential rules of writing fanfic are--
• If the owners of characters in any media are fanfic friendly, it's okay to write and share it as long as it's not for profit.
• If the owners of the characters, etc., in any media aren't fanfic friendly, don't share your fanfic in that universe if you don't want to be chased by lawyers disguised as pit bulls.
• If the owners of the characters, etc., are friendly to fanfic but ask that you not write slash (heterosexual characters taking a partner of the same sex) or erotic stories, don't write it. Appreciate the creator's generosity in allowing you to use their universe and respect their wishes about their characters.
Lots of fans like to thumb their noses at the copyright and trademark laws for various reasons, but it boils down to a matter of respect and thanks. If you enjoy someone's work, don't screw them financially or trash their characters.
How does this relate to those of us who write original fiction?
According to most publishers, we should ask readers not to write fanfic using our characters because it endangers our copyright.
Copyright violation is much more severe if the violation is in the same media. In other words, fanfic is more dangerous to the fiction writer's copyright ownership than it is to a movie's copyright.