Personally, I like to 'pretend' to be the character. And this bout of pretending is more than just 'acting' like him but being him. Thinking like him.
For instance, lets say I'm writing a guy who is the world's biggest geek/nerd.
Well, how did he become that person? He must have a history that made him who he is.
Out of his history I craft a mold of his personality and thought processes and all his dialogue, actions, thoughts, etc will be based on this mold...
So, while I'm in this mode, I'm asking myself a series of why why why questions. Why for everything. Why and How. How come he does this? How comes he says that? Why does he believe this? Why doesn't he do that?
You keep asking these questions and the answers will flush out this character and make them real.
The answers can come from your personal experiences, from what you've observed, read, saw on tv, etc
Anyways, there are about a billion ways we come up with our characters. Some writers use worksheets, some like to write histories and background sketches.
I like to 'become' the character. Male, female, young, old, black, white, doesn't matter. But that is what works for me.
Good luck
Mel...