Why does he ( my teacher) touched my hair?

I'm in college by the way, he's 6 years older than me and well he's a friendly and outgoing person I haven't seen him doing that to other girls just me whe we were in class he has done that twice, he told me that I have a beautiful long hair and once he grabb it with his hands and the other he grabb it and explain to my classmates how someone did something to him but I wasn't paying attention to the conversation when he suddenly did that I don't know what to think. I talk to him as everybody else
Why does he ( my teacher) touched my hair?
Post Opinion