Fanfiction is written by a community of people, also known as Fandoms, who write they're own stories based off novels, Tv shows, anime, games etc. The length of fanfiction also depends on the writer, but most fall somewhere between 1000 and 23000 words.
Fanfiction has ratings and different genres, that can be found in tags. Ratings are usually rated from G to E on Archive of our own. On fanfiction.net, they can be rated by K's etc.
Some fanfictions can keep the original story setting but change the characters relationship.
Others are Au's, where they can create a whole new plot etc..
Most Shippers write fanfiction between their ships.
Keep in mind Fanfiction can be written by all ages, so fanfiction is different, some do not have good grammar etc.. be nice, they're just writing fanfiction for fun and to share what they like(Don't criticize them).
Most fanfictions are found online.
Keep in mind fanfiction haters, if you write your own stories based off something else, it is a fanfiction.
(Sidenote): Fanfiction does not have to be smut or lemon.
Mary loved writing and she really wanted the two characters to get together in the book she was reading, so she decided to write a fanfiction based off the book. In the story, she twisted things around so the twos characters ended up together. A lot of people in the fandom liked her fanfiction, even though the grammar was bad.