Fanfiction is the name of a genre of fiction stories written by Fans of popular characters or perhaps a particular setting.
It is controversial idea in that the characters and settings in a book are deemed as having a copyright so long as the book itself is copyrighted. Most authors subscribe to this; however, some fans feel this is fair use. In some cases where the original story is no longer under copyright the characters would not be either. For example characters from the Bible can be used in a fiction story. The stories themselves are often sequels to the original story. Of course Fanfiction need not be limited to books. There can be videos, comic books, games, movies, and even Plays.
 Fanfiction sites
http://www.Fanfiction.net is likely the most popular but other sites include: Tumblr, Archive of Our Own, Wattpad, deviantART, Dreame,Quotev, Kindle Worlds, Asianfanfics, FicWad, Internet Archive, Feedbooks, Goodreads, LiveJournal, FictionPad, MediaMiner.
 The Format
The format of most fanfiction books is pure text based. The formatting is just what you see when viewing the text itself. In addition the chapters are often in separate files. There are tools that can be used to convert the format to more suitable formats for eBook readers, like ePub or MOBI. One such tool is FLAG that converts directly from the web site.