Do your research when necessary—Taking literary or creative license is one thing, but make sure you do some research if you’re writing about something where specialized knowledge is required. If you’re writing a police mystery and an important element is the autopsy, make sure you know about real life autopsies. You don’t need to go back to school, but you do need to do your research, read about it, and get any questions you may have answered so that you can convey an understanding of the subject matter. If you’re writing a story set during the Civil War, make sure you know the dates of the Civil War. If you’re writing a work of fiction, you can create characters and mend circumstances to fit your needs, but you can’t alter the dates of the Civil War or the outcome (unless it’s a science fiction book). Writers can and often do alter or tweak some historical elements to fit their needs, particularly if you’re inserting fictional characters into actual historical events. Don’t go over the top with it. If your story is set in a particular place that you have never visited, do your research to learn about that place then you can weave what you’ve learned into your story. It may even change things dramatically for you and force you to change elements of the plot or change scenes, etc.
Murder at the Ocean Forest is set at the Ocean Forest Hotel in Myrtle Beach, South Carolina back in the early 1940s. Unfortunately, the hotel was demolished in the 1970s and there is little left about it today. So, I had to research the hotel and find out what information was available. I researched books and articles. I had conversations with people who had been there. I looked at photographs. I did my best to recreate that place in my mind then convey that to the readers. Of course, I did take some creative license in certain aspects of the hotel, but it didn’t involve anything egregious. Those who remember the Ocean Forest and who have read my book said that it they felt like they were there and that it was just how they remembered it.