Why guys stare but don't approach?

So I have this classmate who used to stare at me very much in 1st year of our med school. He used to sit beside me always. I could feel him hearing my conversations. Once he was with friends in hallway and I was walking and noticed only he came out of the hallway and stared at me like 1min and then went away with a vague smirk/smile on his face. I thought he would approach but all of a sudden he stopped looking at me. But he didn't leave me alone completely. He used to stare on and off. I just wanna know why guys do this? And yes I'm not into him it's just that I'm curious to know why they don't just leave you where you are or approach you? What's with this on and off thing?

Why guys stare but don't approach?
Post Opinion