It depends on what kind of threat it is. Some threats are criminal (threats to do bodily harm, threats to force you to do something you have a right not to do). Some just mess with your head.
If you are being criminally threatened, you can call the police and report it. If they are just "mess with your head" kinds of threats, you can refuse to engage with the other person--walk away, end the conversation, avoid dealing with them for any reason.