Ultimately you are responsible for your own survival and safety. As recent events have shown violent confrontations occur quickly and are usually over with by the time law enforcement arrives. Following a few simple steps will help you to avoid or survive violent confrontations.
The number one thing you can do to protect yourself is to be aware. What does this mean? The term "situational awareness" best fits this concept. You are in a much better position to avoid a confrontation if you are aware and paying attention to your surroundings and can see the danger signs and take steps to avoid them or mitigate them. Does this take specialized tactical training? Absolutely not. It just takes a small commitment on your part to simply pay attention.
Next time you are walking in a public place with a large number of people take a look around and see what other people are doing. Most of them will have no idea of what is going on around them. Many are completely engrossed in their phone or tablet. Others have earphones plugged in and cannot hear anything around them. Many people will walk with their head down looking at their feet as if this will protect them. All you have to do to dramatically raise your own awareness is to take out the earphones, put away the cell phone, lift your head and look around. Your own gut instincts will tell you when someone or something is not right.
Once you have recognized a questionable situation you can take action. In most cases this will be as simple as walking in a different direction, crossing the street, moving towards a large group of people or into an attended space such as a store or other occupied building.
If these options are not available to you because of geography or other factors you can always become very loud and draw attention to yourself and by proxy your situation. Do not feel embarrassed to yell and scream if you feel that is necessary for your safety.
There are many other options available to you depending on your level of training, commitment, and willingness to do what is necessary to protect yourself. The steps I have outlined above are the first steps required to recognize a threat and potentially avoid it. You could hold a high level black belt in a martial art but it will do you no good if you do not see the attack coming.
These are just some of the things that are taught in the personal protection classes offered by Strong Foundations Firearms Education.