I'm not soo sure... Maybe like when he asks you question and then writes a sentence on a piece of paper, folds it up, then hands it to you, walks off, and when you open it up, it says "do you like me?" on it.
It happened to me once, during class in my sophomore year in highschool. Apparently, that was the last day I saw him, cause after that, he disappeared and I haven't seem him since. It's been a year since I last saw him.
lol, anyways, yeah that's one of the ways to know if a boy likes you. Another one is if he picks on you, but at the same time, cares for you.