This is the answer to the question of ensuring personal safety. The question of ensuring collective safety can be found here: But who will protect the homeland?
Here we are talking about protection from spontaneous, unmotivated, uncontrolled aggression against which dialogue and persuasion do not work (drunkenness, anger, mental illness, etc.)
Methods of protection:
1. The police. In fact, this deterrent is only effective for people with hostile intent who are in more or less normal control of their faculties. For people under the influence of anger, alcohol, illness, etc., the police do not exist. Additionally, when aggression occurs there is a 99% chance that there will not be any police near you. Therefore, the bottom line is that the police really only provide psychological protection (the expectation that through the police you can threaten retaliation, assuming that you are comfortable with threats as a tactic against others). They provide neither immediate nor long-term protection.
2. Retaliatory violence, assuming you cannot resist using it. This case is described in the article If a crime is committed in my presence, below.
2.1. Alternatives can be found in the Nonviolence in Action: Methods and Approaches in the “Methods of protection” and “Conflict resolution” sections. The available security techniques used are: finding shelter, hiding, distraction using actions/noise/light/other signals, attracting attention of those nearby, using non-lethal protection methods, using methods of passive security that you have prepared in advance, etc.
3. Prayer. An effective method for believers.