Consider undertaking a self-defence course. Carry a personal alarm, or be prepared to shout loudly if attacked. Avoid isolated or poorly lit places, especially at night - walk with a friend or stay with a crowd. Ask for a Security escort. Be alert and walk purposefully.
Confidence deters attackers.
Be alert to surroundings. Keep eyes open - constantly scan area. Keep ears open - don't wear headphones. Maintain attention to the environment - avoid daydreaming and being preoccupied with thoughts. Avoid walking or jogging alone.