Why is there tension between us if he doesn't like me?

So I know for a fact that this guy I have a crush on doesn't like me, he showed it in various ways when I tried to get close to him.. he used to stare at me a lot with a smile and usually got really nervous around me (couldn't look me in the eye for example..) but not anymore.

He's usually talkative around his friends, but I noticed that whenever I'm around he just stops talking and looks a bit uncomfortable, now why is that? Personally, when I don't like someone, I barely notice them and act natural, so why does his behavior change if he doesn't care about me?
Why is there tension between us if he doesn't like me?
Post Opinion