First of all, do your best to get out of the situation and avoid the fight. Run, escape, just don't be there. But if this is not possible and you are forced to fight, then before they get too close to hurt you, you have to intercept them by striking first.