Fiction is any story made up by an author. It is a creation of the author's imagination. It is not based strictly on history or facts.
The opposite of fiction is non-fiction, writing that deals with facts and true events. Often in a library, part of the library is for fiction books and another part of the library is for non-fiction.