How do you know if a twelve year old guy is flirting with you?

This may depend. First, establish his personality, like if he is 'B-boy' or 'shy' etc. You can use some logic, and some key points in order to determine the rest. First of all, get to know his friends, if you can. If he is outgoing, or 'B-boy' (Yes, I'm so behind the times) he'll likely tell them. If he's more of the shy type, you can just pay a lot of attention. For example, check to see if he seems to be looking for you. Try to remain unseen, but be able to see him. If he looks around more than most people do, he probably has a crush on someone. Second, check to see if he tries to start conversations with you. That's a sure-fire sign. And last of all, try to hang out with him (if it doesn't ruin your 'reputation'). If he is flirting with you, he will attempt to strike up a conversation at every chance. Unless he's the type of guy with a self-confidence problem. Then you'll probably have to start the conversation. Or you could just say hi, which'll give him confidence that you don't utterly hate him, and possibly allow him to begin a conversation.