It's tricky, really you want to run in the opposite dierection to which they're facing, simply having to spin round 180 degrees will throw most people's aim off significantly (your average mugger isn't exactly an expert marksman)
another trick I used to use when walking round a rough area at night was to keep a pocket full of pennies on me, if anyone started I could just reach in the pocket and chuck the pennies at their face. It gets them off balance and gives you time to sweep their legs out from under them thus giving you control of the fight.