I say "knowingly" because there is always the distinct possibility that the name you made up for one of your characters--whether it's the hero, the villain, the victim, a secondary character--actually belongs to a real person. That's completely out of the author's control, of course, that someone, somewhere happens to have a name you've chosen for a character. But suppose the author knows someone who has the perfect name for a character?
First off, I always think that it's simple courtesy to ask someone if you can use their name for one of your characters. And it's very wise to make sure that, unless you discuss it first with the person and are 100% sure they're a good sport with a fabulous sense of humor, you don't name your nefarious villain or irritating busybody secondary character after them (last time I checked, no one complained if the hero or heroine--you know, the one with the ripped bod, the marvelous sense of wit, and the genius IQ to foil the most nefarious of villains--had the same name....)
Second, the author must ask him/herself what it is they hope to accomplish by naming a character after their sister, best friend, the local bartender, etc. Is it an attempt to pay tribute to the person whose name you're using? If so, make sure the character is worthy of being the trophy (unless, as I stated before, the person whose name you're using has a great sense of humor!) Is it a lazy way to create a character? Be warned that most people might not see themselves the way you see them; there's a chance that the author might, without meaning to, offend the person.
Third, there's always the author who will include a real person--name and all--as a minor character in the story. This is something I've done with two good friends, Patty and Mike. But there is a stipulation to doing this; they (your friends/characters) should have a reason to be in the story in the first place. In my third Black Horse Campground mystery, "No Vacancy", J.D. had to follow up the investigation at a motorcycle shop. It just so happens that Mike and Patty own one. I used them to deliver information to J.D. about a suspect and I used their real names. The scene wasn't forced because they had a purpose in being in the story. I probably won't use this element very often, but it also served to thank them for helping me get the details right in the story!
No friends were harmed in the creation of this story!
Naming the characters after real people might work in some instances, but an author should always be aware of the pitfalls and always, ALWAYS, ask for permission to do so. It certainly will inspire the character's namesake to promote the book for you!