When Northcoast Shakedown originally came out, I got accused by a coworker of basing most of my characters on people in the company where we worked. We worked at an insurance company. Nick Kepler scored free office space from an insurance company, and both were big property/casualty companies. However, I would be a little disturbed if the executives at TTG Insurance bore any resemblance to the ones at the company I discreetly refer to as BigHugeCo. The truth is the two executives who make Nick's life difficult in that story started out as stock bad bosses. That's how they got into trouble. Elaine, the secretary? She started out as someone for Nick to vent to while having a beer next door to TTG's offices.
The trouble with basing a character on an actual person too closely is that the writer then starts trying to bend a character to the real person, which makes for stilted, dull writing and poor dialog. A person may inspire a character, but if a writer is skilled or, at least, has good instincts, the character will take on a life of its own.
Sometimes, a central character is the author himself or herself. Sue Grafton has admitted as much about Kinsey Milhonne. She has stated that Kinsey is her if her life had taken another turn. Ditto for Spenser and Robert B. Parker. The darker tone of the earlier novels reflect a lot of the personal struggles Parker himself spoke of in that period of his life while later, when he was in a better place, the novels took on a lighter, clearly amused tone.
(Incidentally, I am not Nick Kepler. He's not as technically savvy, and I never had as many girlfriends as Nick. Though I think I had better luck with them.)
A clichéd piece of advice I used to get when I first started was to base a character on an actor. (Early on, I envisioned John Cusack as Kepler, though that faded away after a couple of stories.) Sometimes, that works as long as it's not someone over the top like Arnold Schwarzenegger or Vin Diesel. The trick here is to use the actor's persona as a jumping off point. Let's say you love Kaley Cuoco Sweeting from Big Bang Theory and want to drop her into your novel. Well, I'm sure Kaley will be flattered, but most likely, you really like how she plays Penny on the show. But if that combination of appearance and personality works for you in a tough-as-nail lady sheriff in rural Wisconsin, knock yourself out. Just know that a woman who has managed to get elected or appointed sheriff of a Midwestern county is going to already have a different background from an aspiring actress and waitress at a California Cheesecake Factory, particularly if there are no nerdy scientists around to color her life. (You might get away with a Sheldonesque coroner, but that's pushing it.)
Often, for me, characters just arise. They are functions of the story. Take a guy, put him in a situation, and ask yourself who he is and why he's there. More often than not, that's the first scene of a story as well as the birth of a story. It's not creating a role and then building a story around him. It's all about finding this imaginary person and creating a story to find out who he is. Nick Kepler is a function of a rainy night and having walked down at least two or three semi-rural highways in my time.
Sometimes, it really is a real person who inspires a character. Sherlock Holmes, probably the ultimate crime fiction protagonist in the English language, came from a rather quirky and highly intelligent doctor Sir Arthur Conan Doyle knew or knew about. A more extreme example comes from the 1990's. Mike Judge, the mind behind Office Space and King of the Hill, actually based the dimwitted, gravel-voiced Beavis on a guy he used to know (though I'm assuming the real Beavis was nowhere near as... um... intellectually challenged. Heh-heh. Heh hmm heh. Fire!)
And sometimes, a character just demands to be written. You get a character like Tyrion Lannister on Game of Thrones whose personality is so clear that one has to write a story or three about him.