I need help...its bad.

I'm 16 turning 17 soon, and I've been in a relationship with my bf for almost 6 months. Long time sorta....but I'm really close friends with this one guy and idk if he tries to flirt with me while we are in class together but I would be standing and he would put his head on my arm and stuff....and I'm like idk what to do bc when he does that I get butterflies in my stomach and It seems wrong because I have a bf but I really just DONT KNOW what to do!! Please help me.