Study the front cover of the book. If it says that it is a novel, it is fiction. If somewhere on the cover it says, "based on the true story," or "a memoir" or "an autobiography," then it is fact. If a story is in a magazine or on a website, a reputable journalist will state whether or not the story is based on real-life facts.
Research the story on the Internet or at a local library. If a story is popular, it will pop up on most search engines immediately. A local library should be able to provide information in reference materials such as encyclopedias or journals that can confirm whether a story is fact or fiction.
Read the credits at the end of a movie. If the story is fiction, it will have a "fictional events" disclaimer, which states that the characters and story lines are based on fictitious characters and events.