Fanfiction is, quite literally, fiction written by fans - writing stories based on already-created media (usually, but not always, professional), which may or may not contradict canon.
Note that almost all fanfiction I read is tied into the Legend of Zelda series.