I try to keep it true to the setting and their background. I mostly play fantasy, but most fantasy worlds that are fleshed out tend to draw influence from real world civilations to populate the place. So I'm playing a character from what is basically fantasy France I'll choose a French name, or English/Scottish/Irish/Welsh for fantasy Britain, or so on.
When I've pegged some languages of origin to draw from I go to a name meaning website and look through lists of names from those languages. I usually end up with 10+ that I like, whether because the meaning suits the character or because I just like the name itself, and I whittle it down from there. Sometimes I'll swap a letter or two in a name to make it more appealing, or smash the first part of one name with the second part of another to make a nice Frankenstein's monster of a name.
If the above doesn't work, or I really don't feel like crawling through another baby name site, I fall back on the clutch fantasy name strategy: just start smashing letters and syllables together at random to make something up. As long as it can be pronounced (which honestly is optional for some fantasy races and creatures) it can work. I go for a general feel of a name when using this method, and sometimes my already chosen character details make that easy. Orcs and such get short names with hard consonants, elves and such get flowing names with excessive vowels, dwarves and such fall somewhere in between, really weird species get names that sound as alien as possible, etc.
And finally, if I'm at peak laziness, sometimes I just go hit up a name generator site that will spit out some kind of names that could work. That goes on until I find something I like.