How do you tell men you aren’t interested in talking without him getting mad?

Many times men will come up to me or my friends and start chatting us up. We could have our headphones in and he will actually pull them off. When you tell him you are busy or not wanting to talk, he will get mad and possibly call me or my friends names. If we are gentle and try to hint that she aren’t interested, he won’t get the message and will continue to talk.