Nonfiction is factual information. Things like magazine articles, newspaper stories and textbooks are examples.
Fiction is invented – something that is imaginary. Things like short stories, novels, mysteries – because they contain the elements of a story.