Becoming a World Builder
World Building is the root of every good story. You might have the greatest characters in the world, the best plot ever conceived, and the freshest, most riveting writing style known to man, but if your world doesn't make sense then, I promise, no one is going to care.
Now a lot of people may think that World Building only applies to science fiction or fantasy, genres in which the characters live on a completely different planet or time period and have laser guns or magic or starships or dragons (or all of the above!), but that isn't true. World Building is just more obvious in those settings. Believe it or not, it is actually more difficult to build a believable story taking place in 1929 New York City than a high fantasy taking place in a magical world called Sedalia (at least, it is for me). I'll explain why.
Let's say that Sedalia is a world where a person's magic is determined by the state of their hair. Long hair of good quality would produce better magic than short, unkempt hair, so in this world, hair care products are highly advanced and very expensive. Also, the type of magic a person uses can be seen by the natural color of their hair such as brunettes having elemental magics, blondes having aggressive-physical based magics, and redheads have a very rare combination of both. Because of this, a law is passed that makes it illegal for a person to dye their hair, so all of the hairdressers that used to specialize in hair coloring have to go into hiding. In this world, almost all punishments would revolve around destroying a person's hair either by cutting it, damaging it or, for a capital offense, burning it off at the roots so it couldn't regrow.
In this situation, could you tell me I'm wrong? That there isn't a world where magic is controlled by the type and quality of a person's hair, and that the most arbitrary and mundane laws here on Earth would be considered a capital offense in Sedalia? You couldn't, because that is the world you've stepped into. You, as the reader, trust that I, as the writer, am going to present logical reasons as to why I am telling you this story, and so long as the plot and characters conform to the world which I have built, you will be able to suspend your disbelief and simply enjoy the story.
On the other hand, if I said that Susie Stalino and the Casino Boys took place in 1929 New York and that, while on the job, Susie's boys use texting to keep in contact with her, you would think I was an idiot that had no idea what I was talking about. Most likely, you would put down the book and never pick it up again, and it wouldn't matter if it had the greatest storyline in the world because you wouldn't read it. My lack of proper World Building would have ruined all of my credibility as an author.
Now that example is rather extreme - if you're going to write historical fiction you should obviously have at least a cursory knowledge of the era you're writing about - but it still illustrates my point. The audience you write for, whatever genre you choose, is going to know the difference between a Glock 17 and a Beretta M9 and, if you're telling a modern war story, you should know that too.