Remove any distractions that you can control so that you are totally aware of your surroundings. This includes removing any music players and not being on the phone. While it may seem like a good idea to be talking to someone, being in a phone conversation could distract you from noticing what else is happening around you.
Make sure that your walking route sends you down down busy, well-lit streets as much as possible. This may discourage creepy guys from following too closely.
Vary your pace. If you speed up dramatically and the creepy guy on the street does, also, you may be legitimately concerned. It's unlikely that if an innocent person were following you coincidentally he would step up his pace when you do.
Cross the street. As you cross, glance back to see if you are being watched or followed.
Get to a safe place. Immediately. A safe place can include a restaurant, a convenience store, or any other location where other people will be present. Once you're in a safe location, arrange for safe transportation to come pick you up to take you the rest of the way home.
If you cannot reach a safe place and you are in imminent danger, yell. Attract attention to yourself in an effort to deter the man following you. If you don't have a powerful voice, you could carry a whistle.
Call the police, if possible. Get a good description of the man following you, especially if you feel physically threatened.