Watch what is going on around you and be very aware of your surroundings. Let people know where you are going and when you will return. Travel with a male companion or in groups. Take self-defense courses, especially those taugh by the local Police if offered. Take ships tours whenever you are not sure of your safety or feel uneasy. Be assertive and look people in the eyes and act confidant of yourself and not meek. Do not drink too much. I am sure I have missed many but I'll let others jump in.
PS Oh, it helps to understand the language but not to allow the locals know you understand what they are saying. 8)