Depending on where you are, a girl may simply be polite or getting to know you and not flirting with you. Usually, it's socially acceptable for people to flirt in certain situations. If you're in a bar, restaurant or at a party, it's more likely that a girl will be flirting. If you're in school, at work or a store, it's more likely that she's just making conversation.
Body language often betrays people's actions. Nonverbal communication signals things that people may be hiding or not saying, so pay attention to how a girl does things while talking to her. If she cocks her head and leans in while you're talking, she's trying to get closer to you, a good sign she's flirting. See if she's making eye contact while you speak to see if she's paying attention. This is a good indicator of flirting. The body also signals boredom, even when she might not say it. Signs of boredom include tapping the table, shaking her foot or twirling her hair. If she's constantly doing this she's probably ready to talk to someone else.
Just because a girl talks to you doesn't mean she's flirting. Some people simply like to talk. Look for key signs to flirting in conversation. If she uses your name a lot or uses a nickname or term of endearment, she's genuinely interested in you and is probably flirting. Does she talk about personally things or ask you about yourself? If you're having meaningful or personal conversation, it's likely that she's flirting.
What she does can tell you a lot about flirting. If she buys you a drink, she's definitely flirting. The level of physical contact or closeness also signals flirting. If she sits very close to you or touches you, she's almost certainly flirting. If she lets you touch her back, she's flirting.