Research, write and edit. There are a lot of savvy readers especially in the mystery/thriller/police procedural genre. If you don’t have the background, don’t try to fake it. Shows such as CSI have made people think they know how criminal investigations are handled, but if you talk to homicide detectives, they’re usually very generous in sharing their expertise, and they’ll give you accurate information.
It’s good advice for any writer to read a lot. The more you read the better your writing becomes.
New writers tend to think the book is done when they finish it, but that’s just the beginning. Editing and then more editing is the secret to the best book you can write. My background in journalism really helped with editing. News stories were rarely printed the way I wrote them. Sometimes my favorite paragraph, the opening one, disappeared because the story didn’t fit the space allotted. I learned not to take it personally and found many times the story was actually better with less.