Can y'all help me interpret the meaning of this situation?

Okay so there's been this guy that overlaps with me a lot throughout our school day but I have never really spoken to him.
We have math class together and see each other a lot in the halls and I have basically never really spoken to him other this one time when I just gave him a genuine compliment saying "Hey, I like your shirt."
Also, coincidentally, we happen to have lunch time together as well and our tables are next to each others.
Anyways, the situation is that today, out of the blue, I was walking out of class when he tapped me on the shoulder and was like "can you just stop following me around everywhere?"
It was very random and I didn't know how to respond.
Is this just pure miscommunication or is it possible that he was trying to just get my attention?
I am genuinely so confused.

Can y'all help me interpret the meaning of this situation?
Post Opinion