Why does he act like he's into me one minute & like he hates me the next?

he told me he likes me as more than a friend. he holds my hand sometimes and strokes my leg. he teases me but then apologizes but also sometimes he just gets really mad for no reason and goes like "shut up" or "don't say that so loud" or "stop doing that" .. I don't know .. also he told his friend that he thinks I'm kind of bitchy but towards me he acts like he likes me but he's also kinda shy about it I guess.. I honestly don't know wtf is wrong with him. any ideas? xD