There are
many techniques for remembering names, but ignoring those, here's what I normally do:
1) When being introduced, clear your mind for a moment and try to actually pay attention to what the other person is saying (they will usually tell you their name). You'd be surprised how many people don't remember names simply because they were not paying attention when the name was given.
2) When the introduction is over, repeat the name out loud to indicate that you heard it right. If you didn't get it right, this gives the person a chance to correct you. This is also very useful when being introduced to multiple people, as it lets you repeat all their names and show that you actually care enough about them to make sure you get their names right. If you're unable to repeat the name because you didn't pay attention in 1), simply excuse yourself and tell them you didn't quite catch their name, and they will usually tell you again.
3) Later on in the conversation, when you realize you don't remember their name (either because you didn't pay attention in 1), didn't bother to do 2) or both), simply say so and ask them again. If you do this within 5-10 minutes of the conversation, it usually will not be as akward as asking them when meeting them for the fifth time three months later...
4) Whenever you realize that you don't know someone's name, simply say so and ask them what their name is again. Usually, this will be easier if you say something along the lines of "Sorry, but I'm terrible with names. What was yours again?" or "Sorry, but I forgot, what was your name again?" This may seem a bit stupid, but usually I get a positive response, since again, you show that you care enough about the person to try and remember their name, despite your "name memory handicap".
5) If you'd rather avoid asking their name again, try listening in on conversations about this person. Usually their friends will use their name when talking to them or about them, and you can pick it up there. Also, consider asking someone else who knows the person (i.e. one of their friends or colleagues) or someone who is better than you at remembering names.
6) When you meet someone who you know you've met before but don't remember their name, tell them so and offer a reintroduction. I never assume anyone remmebers my name either, so the situation is never really that akward.
In conclusion: Don't be afraid to be up front about not remembering their name. Usually telling them will be less akward than pretending to know who they are when you don't.