I rarely receive compliments in person from anyone other than my boyfriend, so when I do I feel kind of taken aback. I usually just smile, thinking back I typically forget to say thank you ._. (shyness doesn't help)
My boyfriend still after almost 2 years compliments me all the time on everything, it's cute. :3 In that case I'll usually thank him and give him a compliment too. I used to do that whole "whaaat no I'm naawwwtttttt you're just saying thaaaaat" thing but lately I've been trying to accept compliments better.
Online... it reeeaaaaallyyyy depends on what the compliment is. If it's something specific, like something I worked hard on, I'll smile about it, but it rarely ever is.
Either way, I always try to just say thank you and move on.