So, the first thing to know is that if you are writing fiction you don’t have to be completely accurate. There’s a sequence in my novel “A Long Walk” where the main characters are on a highway outside a small town. The highway is real, absolutely and completely as I describe it in the book. So is the small town. They just aren’t in the same spot. The highway is outside another small town, that is in a different direction. I did this because the sequence was important to the story, and the town that supported the sequence didn’t match at all. It would not have been on the route to where my protagonists were going, and they would know that.
So, change the world to match the story. People who have read my book don’t seem to care. Many of them are from the area I wrote about, and have driven that highway many times.
On the other hand, you have to be internally consistent and not stupid. If I write about hacking and I’m writing for a very technically adept audience I need to have at least a passing knowledge of my subject. One of the most mocked things on the entire Internet is from CSI NY. One character say “I’ll create a GUI interface using visual basic, see if I can track an IP address.”
Clearly the writers did enough research to find out that those were terms used in the IT industry, and didn’t bother to do the tiny bit more research to realize that they were unrelated terms, or that if there’s one bloody thing you don’t need to track an IP it’s a GUI, or that if there’s a second thing you don’t need to track an IP it’s VB. Sorry, I teach programming, mostly server side, in my day job. This kind of thing drives me insane.
There are ways around that as well. Be non-specific. “I’ll try and trace them” works if you have no idea how someone would trace a hacker.
On to the actual research. If you want to actually know how to do something the amount of research will vary with the complexity of the task. You don’t have to be able to do something to write about doing it, but you have to have at least an intellectual understanding. Wikihow is a great resource for a lot of things. You can learn a huge number of skills on there. For the most part you will need to practice them to actually get them, but you can get enough detail to use it in a story just from reading it.
Books are another great resource. I use Where There is No Doctor for describing first aid in primitive settings. I also used it to save my leg when I was fifteen. I can’t recommend that book enough.
Obviously a lot of my research is on survival techniques. That doesn’t mean yours will be. There are online guides for almost anything you would want to do.
I use google a lot, and I use reddit a lot. Reddit is a huge treasure trove of information, although much of it is wrong. Wikipedia is also valuable, and more for the citations than the actual articles.
Places are another thing that there are levels of resource for now that didn’t exist before. Google maps and Google earth are amazing for any writer, because you can follow roads in foreign countries. For me, I mostly use places I’ve been, but I want to be accurate when I can, so I trace out the route my characters would be taking, the twists and turns, the places they would visit. That doesn’t mean I give the reader all of that info. Let’s face it, when you are reading you want the important pieces, not the random left turn next to the donut shop. However, if I do the research then I don’t have something stupid in there, and I’m better able to give a sense of the place the characters are in, even if I don’t bother to include every single stupid detail.
Just like with my characters, I have to know my settings in far more detail than I have to present them. Nobody will notice an accurate detail that I don’t bother including. Many people will notice an impossible detail that I do include.
So, that’s the why, and a bit of the how, of the research I do while writing.