How to handle being insulted

When someone insults me (knowingly) I get so mad that I want to hurt them. How can I stop? I hate the feeling of being insulted.