There’s no one good definition of flirting that covers all flirtatious behavior. So you can’t always tell if someone is flirting. Everyone does it differently. @Midnight_Blue‘s definition is pretty good, but, as that “probably” indicates, there are circumstances where undue attention means something else. Her warning, also, is well taken. A lot of very obviously flirting women just do it because that’s their nature. It’s funny how they are surprised when men come on to them all the time. Oh well.
I guess what I’m saying is that it doesn’t really matter if you know whether a girl is flirting or not. The level of uncertainty about her true feelings for you doesn’t change based on this knowledge. If you want to really know what she thinks, you have to ask her to do something—maybe ask her directly what she thinks of you, or ask her to do something with you, just the two of you, or with a group.
Being flirtatious is a way that women can also test what a guy thinks, without actually asking. Of course, it often doesn’t work, since guys don’t always see what they are being asked. A lot of women have no clue about how to flirt, so just because they don’t flirt doesn’t mean they don’t like you. Or, to put it a positive way, a woman who doesn’t flirt may like you a lot.
Communication between men and women, or between potential lovers of all sorts, is just hard to interpret. If you are afraid of making a fool of yourself (and who isn’t), you are likely to miss a lot of opportunities. But that’s not necessarily a bad thing. If you pursue a lot of opportunities, you might not get deeply involved with any of them, and you might have a hard time learning to get deeply involved. I’ve found, on more than one occasion, that a woman who flirts a lot really has a hard time trusting, or being intimate. Flirting is actually a way of getting attention while keeping her distance.
If you want a lot of fucking, then sure, flirt with everyone who flirts back. Push the envelope. Move fast. If nothing happens, on to the next. If you want a relationship, then pay attention to the whole person, not just their presentation, flirtatious or not. Be willing to open yourself up, slowly, as trust builds. Flirting can open that door, or shut it. Non-flirting can open that door, or shut it. Being able to tell if someone is flirting hardly helps you at all.