Think through how you usually react to crisis situations. Think of a few past examples to see if there is a pattern. You can change how you react by practicing a different response if needed. Talk to others about ways to handle confrontations and rehearse alternatives. There is no right or wrong way to react.
Every situation is different.
The best response depends on a combination of factors such as the location, the assailant, presence of weapons, your personal responses, etc. Walking Plan and use the safest and most direct route. Choose well-lighted streets at night. Become familiar with businesses that are open late. If you feel uneasy, go directly to a place where there are other people.