When you sit down to write your story, one of the most important things to know at the start is it’s genre. What kind of story do you want to tell? Does it involve a heist, or ghosts, or a tall ship commanded by pirates? Once you answer that question, it’s fairly easy to do the proper research needed to ground your story properly.
Genres are how we can easily identify what kind of story is being presented. Mystery, romance, horror, historical, fantasy, science fiction – those are just a few types of genres that are available. The fun thing is that genres can be a mix of each other – a mystery can be historical (The Name of the Rose); a fantasy can involve romance, as well as magic and adventure (The Princess Bride); science fiction and fantasy can be blended together (Star Wars); and horror can be a metaphor for teen angst (Buffy the Vampire Slayer) or an exploration of sibling/familial relationships (Supernatural; Charmed).
Establish and ground the story in one genre, using it as the primary background. Then add elements from other genres (such as romance, drama, and mystery) to help add tension and new plot threads for readers to follow. The clearer you are on the kind of story you want to tell, and in the primary genre it falls under, the easier it will be to revise and polish in the editing process.