Okay, a question:
Is this "street" or "in a relationship"?
If street, take the advice others have given. Move away fast, preferably whilst keeping your hands in a guard position or in your pockets and staying as non-aggressive as possible. CCTV and bystanders are not your friend!
If in a relationship... well, I've ended up going out with two girls who lashed out. One I found out about fairly early on, and used a "job offer" as a way to move out of her life. The other the violence started after we'd married! In the later relationship I got VERY badly hurt, kept "taking it", and I didn't stick to my ultimatums. What finally swung it for me was one simple question that I didn't like the answer to::: "If she'll hit a 15-stone rugby player hard enough to draw blood, what the hell is going to happen when a toddler annoys her?" When I realised that I couldn't trust her to stay calm inside the confines of the house, I backed out of the relationship as directly as possible (I took a job overseas, and then began divorce proceedings).
The reason for mentioning the violence that lasted for years is simply so you learn from my mistakes... violent/aggressive people REALLY struggle to change their behaviour patterns. If you're being hurt in a relationship (and this goes whether you're male/female/straight/gay/bi/whatever) you need to be realistic enough to ask yourself the hard questions and close the situation down fast. Which brings us back to the "street" situation. Walk away and stay passive... even if it means leaving all your stuff in your old house, just buy new stuff because once someone's started hitting, they aren't going to stop (and if they'll hit you when as a bloke you are stronger/bigger than they are, what the hell are they going to do when there's a genuinely vulnerable person in their line of fire?)