Interpreting compliments from Guys/How to Compliment girls?

Anonymous
I really struggle with this a lot. I realize that I never compliment women on anything not because I don't appreciate them but because I'm always afraid of coming off as a creep, which is a deeper issue that I'll try not to go too much into. But I thought about it today because there was this girl in my class who I think is pretty attractive, and today she lost her voice and was struggling to talk, but was still making the effort, and I laughed because I legitimately thought it was really cute, then she said screw you guys for laughing at me, which I don't know if she was just having a rough day Because she was sick, or if maybe she's just a bitch, or insecure, I don't know her well enough. But I really wanted to talk to her after and just say I didn't mean to laugh at her expense but that I just thought it was really cute that even though she could barely talk she was still trying. But I decided not to say anything because I figured she'd mistake it for flirting, but at the same time, maybe I wanted her to take it as flirting? I don't know.

I guess the main question I'm trying to ask to girls is when a guy compliments you, how do you interpret it, do you assume he's flirting, or trying to hit on you?

In the case that you interpret this as flirting, how do you respond, are you cold or harsh in response, do you say thank you, maybe flirt back, and how much does your general interest in the guy influence this?

Or say you were the girl in the situation I described how would you respond to me saying that?

THANKS FOR READING ALL OF THIS
Interpreting compliments from Guys/How to Compliment girls?
2 Opinion