When you don’t feel safe with someone, it’s important to assess the severity of the situation, the risk of injury or violence. If necessary, remove yourself from the situation.
In many cases, however, the feeling of not being safe occurs because of factors that we can influence. In such cases, a healthy response is often to work on modifying the situation and changing our response to it, rather than simply removing oneself.