I remember when I was about 17 and my Dad told me about "negging". He didn't tell me to do it, but said it was one way to approach a female.
It is difficult, or at least an art and not a science, to knowing if someone is interested in you, or not.
Experience helps. But that's no guarantee. So from what I can tell, you just have to be open to trying, and maybe most importantly, learn not to take it too personally when you're wrong.
Finally, I tend to remind myself you don't have to be "right" that often to find someone who's into you