The first step in self defense is simply being aware.
Know your surroundings. Whether in a parking lot, an open park, or in the middle of a crowd in a mall you need to be aware of what is around you and more importantly WHO is around you. Studies have shown that walking while talking on a cell phone limits your peripheral vision as well as takes away your attention, and one hand that you could use to defend yourself. Texting is even worse as it requires even more of your attention on your phone, leaving you with less ability to know what is happening right next to you.
What are your escape routes? Should the worst happen, can you get away? Where? If you are alone, try and get to where other people are. Shout, yell, get someones attention that you need help. The more people that are focused on you, the less likely a mugger or robber is going to stick around.
What is around you? Should someone try and grab you, they have lost all thought of "being nice". Hopefully you have a stun gun or pepper spray. Use it! They want to hurt you, so hurt them! If not, anything can help. A pencil can be enough to jab them and let you have that second or two you need to run. Take advantage of it.
Call 9-1-1. Once have been able to escape, but quickly, call the police. If you have used your stun gun or pepper spray to be able to escape, let the dispatcher know when you call them. Describe the assailant with as much detail as you can, but don't hang around. Do it from a safe distance, but call!