Keep it brief. Don't try to fill a loss for words with a lot of extra words that don't belong.
Don't ever argue a compliment out. Just because you feel that your accomplishment wasn't really all that hard or that the compliment didn't really fit doesn't mean you have to protest or object to the compliment. If you're uncomfortable with the compliment for some reason, keep the response absolutely minimal but polite – smile, say thanks, and let it go.
Don't fish for more. Accept the compliment graciously and move on. Preening for compliments is a sign of immaturity and insecurity; deal with these underlying issues if you actively seek out compliments.
If you're afraid of an awkward silence after being complimented, move the conversation along without blowing their compliment off. If they like your sweater, tell them where you got it. If they say that your hair looks especially nice, tell them where you got it done. However, be sure not to do so in a way that could be taken as bragging or fishing for more praise.
Not all compliments are about your looks. Consider compliments about your character and personality to carry much greater weight than external appearances.
Remember that you are just as entitled to receive compliments as everyone else. Don't try to shy away from them.
Don't change the topic without acknowledging the compliment. If they took the time to compliment you, it was definitely genuine, and should be handled as such.
Others have done this before. This is no reason others have climbed Everest but that still doesn't mean someone who climbed Everest should not get a compliment.
Practice these steps in a mirror. Just imagine someone says something nice, then say "Aww, thank you. That means a lot to me."
Not every compliment is sarcasm, some people genuinely believe you look good or do something well!