I do basically what Samurai Jack says. This is how I do it. First I think of the game. Is it like medieval, or modern, or scifi, etc. I tend to make more medieval games, so most of my names will be old or difficult to understand. So then I think of the character. Is he a main character or just an NPC? If he's a character, or maybe an NPC that plays an important role, what does he do or what is special about him? Say for instance I have a character that is strong and uses heavy weapons. I'll go find a latin generator (or just some random language generator, I generally prefer Norse mythology over greek and latin mythology though). After I grab my translator, I'll type a few words that describe my character and press translate. So for this example, I went to
this english to latin translator and typed in "Strong" and go back "validus, valens, potens, pollens, infragilis, fortis, firmus, durus". Now any one of those is a decent name, but I don't want a literal translation, so I'll take one and add or remove some letters to make a new name. So for Valens, I'll just name him,
Valen. Or Durus, will be
Duru. Etc.
A nice translator is also Google's translator, it has a TON of different languages to pick from.
Norwegian "Strength" is "Styrke", so the character's name could be Styrk, or Styr, or Ty, etc.
Also, you could find a random name generator. Sometimes they suck, but if you keep clicking 'generate', you'll get something you like. I use random name generators for just not important NPCs.
Say you have an important merchant or something in your game, Norse 'Merchant' is 'Kjøpmann', so maybe his name in-game is Kopman, or maybe that's his last name and his first name is generic like Jack. Like if it's a modern game.
I think you get the idea.