Avoid shortcuts that are not well traveled or well lit.
If a motorist bothers you while you are walking, turn around and walk in the opposite direction of the car. Do this as often as necessary and they should get discouraged.
If someone drops you off at home by car, ask the driver to wait until you are safely inside.
Know what reputable stores are open in your neighborhood late at night. If you suspect that you are being followed, stay away from lonely quiet blocks and head for the store you know to be open.
When walking to your car or on your way home, keep your keys in your hand until you are safely inside.