As an author, one tends to get asked in most every interview where one's characters come from. Interviewers seem to find it insufficient when I explain that they are what any people are: happy accidents that one did not always plan on, but tries to raise right.
More properly, the specific origin depends on the character. Sometimes, I contrive a plot and the character manifests to fit into it. Dawn, in my short story Always Darkest, came from a need to have a character who would react with the right blend of spunkiness and resignation to a bizarre fate. (I have the beginnings of a novel for her, but I have yet to figure out where she will fit in the continuity of my series.) Other times, the characters had existed elsewhere and are drafted into a book so I can give them a prolonged existence and fleshing out. Shane and Eliot in my Night's Dream series existed in a prior short story about suicide that was not selected for a writing contest. As I had the inklings of a book already rattling around, I slotted them in so I would have less to write (which, given that their original short story was about suicide, greatly changed the plot of the novel that became We Shadows).
I steal a great deal from my own life to give my characters back stories. One character's religious turning point came from a wander-lustful hormonal snit I had was I was sixteen. Her dalliances with a friend were likewise copped from my own ill-advised canoodling with a girl who wasn't my type (my friend swore she was a lesbian, groping me apparently excluded). Many of the apparently irrelevant anecdotes are purloined from childhood memories, which are close enough to fiction anyway.
For the most part, one character will suggest another and that character will need a few others for a support system. In my Night's Dream universe, there are at least twenty-five characters who are fleshed out enough that I can picture them and know stories about them and their interrelations, which is to say nothing for the dozens of background characters that exists from necessity. Some are real enough that they visit my dreams, though it has never been my main characters. (So far, only a triad of vampires from Danse Macabre.)
At times, some small detail or someone else's impression will change a character. Roselyn was so pale as to have nearly white hair until my then girlfriend mentioned that she always pictured Roselyn as of African descent. The Roselyn in my head immediately nodded that she liked this and so she became. Her hair took on occasionally voluminous proportions based off my publisher's cover design of her.
Other times, characters will expressly refuse to do what I had planned for them, so I have to figure out what aspect of their personality I am missing. In my most recently finished novel, Artificial Gods, a character refused any significant interactions with member of the opposite sex until I realized that this was a crucial plot point and not simply her proclivity. Some of the beginning of that book had to be tweaked so as to make more sense of her disinclination, but a lot of it was already there.
My stories are generally organic, such that I cannot write them when my characters do not wish to cooperate. On the other hand, they sometimes decide to divulge a ton all at once and I find I have written 6,000 words without a break.
I tend not to base any of my characters too much on people I know. There will be an aspect or two that I appropriate, but the character quickly becomes their own person build around these attributes. Girl in We Shadows originated as a fictional surrogate of a friend. Then, since she would only babble, I realized she was insane (the person on whom she was based later went through her own bout of mental illness and substance abuse, but has since recovered). Roselyn's relationship with Dryden was based on a couple I vaguely knew, though Roselyn's attitude was diametrically opposed with the female of that couple.
Often times, when I am trying to sleep or shower, my characters will explain something to me that they would like me to jot down immediately. Suffice it say, I find this obnoxious but I am not about to tell them to shut up. (Instead, I sleep with a voice recorder on my end table so I can murmur their information. The shower issue results in a wet floor and continued impossibility of roommates with whom I am not in a sexual relationship.)
As is reasonable, the more I have written a character, the more I can sense the texture of his or her personality. Shane from my Night's Dream series seems more real to me that some actual people I know. She is a friend and I genuinely feel bad for some of the tortures to which I must subject her to reveal the intricacies of her characters. I need only think of her and can almost sense her near me. I close my eyes and I can sometimes vividly picture her. I love her a bit. I put pen to paper or finger to keys and she starts to dance on the page.
Others have yet to reveal their most crucial secrets to me, but I know them enough to write about them.
I know this sounds needlessly mystical, but this is the level of intimacy I need with my creations. Even my short stories reveal only the tip of what I actually know about these characters, because it is my instinct now to research down to atoms the worlds I fabricate.