There’s a huge spectrum from fully fictional to fully realistic places.
- I love detective stories that play in a real place and I can follow every step of the MC on a map (e.g. George Simeon’s Commissaire Maigret in Paris). I’d say, the plot is fictional then, but the place is not. It is highly interesting to have places involved a reader might know. Maybe, they could be a victim of that murderer they read about! … It adds to the suspense and immersion, I think, because those places immediately become mysterious and maybe even dangerous.
- On the other hand, places like Green Town, Illinois, (Ray Bradbury’s Dandelion Wine) or Castle Rock, Maine, (Stephen King’s universe) are fully fictional, with fictional characters and plot. They are both stereotypical “small town America” and supernatural. Here, I feel, characters and their struggle in those worlds are in the foreground. With Bradbury, lots of it is inwardly - meories, regrets or longing of past events - while with King there’s lots of outwardly action and suspense.
- In the middle ground, e. g. Harry Potter, partly takes place in the known world, which has, however, lots of magical secrets and places.
On your question of “how”, it depends on why you chose those places, what purpose do they have?
If I want a place to “feel” Danish, I make sure, I put some gusting wind, smell of sea and solitude into it … without necessarily naming a place, to me, it feels like home immediatly .
I wrote a ghost story in a lighthouse :). Names of characters place it on the map more, than anything else, since I never name the port it plays in .