People actually ask me this question all the time and it's something I've often wondered about my own favorite writers. I just finished a huge long book with (what seemed to me) a thousand characters. I actually had to make a list of all the first and last names and post it near my computer so I wouldn't repeat any. Still, I made mistakes like calling the dad "Don" in one chapter and "Dave" in another (there's always a Dave in my books.)
I actually don't love choosing names--I'm always anxious the name will sound silly or too trendy or just weird. I usually try to play it safe: first names are those that are appropriate for the age of the characters--for instance, no mom is going to be called "Taylor" but a twelve year-old girl might. "Mildred" is better for the grandma than for the five year-old little sister. I usually choose first names that are short, one or two syllables, and not overly distracting. No "Siobhan," for instance. (No offense to all the Siobhans out there.)
Last names are harder--usually I'm also looking for a short, non-distracting name. But it also has to sound "real"--as in not overly bland. So I often use last names of people I know--friends, neighbors, former math teachers, etc. It's also a nice way of paying tribute to my favorite people--there's been a "Kohli" in my last two books, which is my best friend's last name.