A fiction is a deliberately fabricated account of something. It can also be a literary work based on imagination rather than on fact, like a novel or short story.
The Latin word fictus means “to form,” which seems like a good source for the English word fiction, since fiction is formed in the imagination. Like its literary cousins fable, legend, and myth, however, fiction has a slightly darker additional meaning: a deliberate lie or untruth. When we talk about "the line between fact and fiction," we're talking about the difference between truth and lies.