But, they must be compliments freely given, without attachments of any kind. Literally throw the words out there, and let go of the words. Understand - and accept - the person may not even react. If you have released the words, then you are not disappointed, you merely feel good that you have said something nice.
This is important. Every human contact is a link of energy. Even the act of you reading this is a link of my energy to your energy. I am infiltrating your system right now. ;-)
Back on the topic of compliments, the energy link is important to understand, because people can feel if there are strings attached to compliments. It's not really a compliment if the expectation is that there be a response. Then it's just a gift-with-strings, which isn't really a gift.
On the flip side, if someone does pay you a compliment, the best response is simply "thank you." If you feel strings attached, then you can decide if you will freely give a gift in return, e.g. pay a compliment also, or not.
But don't say stupid things that diminish the gift that was given. Women are the worst about this, often with "Oh, this old thing?" and other self-deprecating responses that create strings back to the compliment maker. People tend to think that shows "Oh, that was a nice compliment, but I don't want to look arrogant by simply accepting that someone said something nice about me," but in fact it's like "Oh, thank you for this nice gift, but look at the slightly torn wrapping paper, and it smells kind of funny." Yep, congrats, you've just insulted the gift-giver.
A compliment is a gift. Just say "thank you," and don't screw it up by insulting the gift giver.