Receiving a compliment can make some people uncomfortable, particularly if they are not very sure of themselves. In most instances, it's important to go against your initial reaction to dismiss the compliment, not only for your own emotional well-being but also for that of the person delivering the compliment.
Agree and Thank
Perhaps one of the most difficult aspects of receiving a compliment is agreeing with it without feeling vain. This can be especially difficult for people who come from a culture that expects modesty and an outward focus. But keep this in mind: dismissing a compliment as untrue ("You have such beautiful eyes." "No, I don't.") essentially calls the complimenter a liar. Agreeing with the compliment doesn't make you vain - it simply means you agree with the statement.
A Default Response
"Thank you" is the best response you can give to a genuine compliment. If anyone takes offense to this response, they didn't mean the compliment and were perhaps speaking sarcastically. In fact, a complimenter's response to "thank you" will quickly reveal their intent.
When They're Fishing
Sometimes people give compliments in the hopes of receiving one back ("You're so strong; I wish I was strong too."). If you receive a compliment that you know is really just a lightly-veiled attempt at receiving a compliment back, you can decide if you want to simply give your default "thank you" or if you want to give the person what they really want: a return compliment. You don't have to compliment them back if you don't feel genuine about it ("Thank you; I do a lot of strength work to get this strong.") or you can indulge them ("Thank you; coming from a strong person, that's a great compliment.").
When It's an Opening
A compliment coming from someone you're attracted to can be a way to compel the conversation forward into revealing your feelings. You can say thank you and return the compliment, or you can use it to swing the conversation around ("Thank you. It means a lot to me coming from you. I care about what you think because I care about you." or "Thanks - you have a beautiful face, too. I'd like to kiss that face of yours."). It's important to note that not every compliment is given out of attraction, so don't use it as your sole indicator that someone feels that way about you.
If you're looking for a default response beyond "thank you," consider adopting a signature response such as "takes one to know one" or "yes; my mother was very good at cooking me in her uterus." Remember, though, that "thank you" is the most appropriate response in most instances.
When It's Creepy
Compliments aren't always genuine, and in fact, they can sometimes be methods for making someone feel uncomfortable - intentionally or unintentionally. The tone of the compliment and the setting reveal a lot about the motivation for a compliment. A person on a subway calling over to you about your "banging body" isn't the same as a loved one giving you a compliment about how fit you're looking lately.
Thank and Move On
Your default response of, "thank you" is still appropriate if the person giving the compliment is a stranger unless you feel somehow uncomfortable with the individual's intent. You're under no obligation to engage in a conversation with someone just because they say something nice to you. Instead, say "thank you" and move on.
If you sense the compliment reveals threatening intent, don't bother with thanking the person for the compliment but instead get away from the person and seek a highly populated area if possible. How do you know if a compliment is actually threatening? A lot is revealed in the tone of the speech and the body language of the complimenter. Note that not all compliments from strangers reveal threatening intent, but their non-verbal cues will.
Compliments Are Gifts
An unsolicited compliment can be a nice, unexpected gift. Accept the compliment graciously and realize it doesn't obligate you to return the compliment, nor does it mean you have to engage in conversation with someone who makes you feel uncomfortable.