Usually dogs will chase you if your going really fast just for the thrill of the chase, if you turn around and go after them (really squatty mutt dogs) they usually turn tail and run.....
If you never want them to mess with you, stay perfectly still and once they get 6 inches away from you scream at them and chase them down the street... they won't chase you the same after that
Once I was skating and a dog was chasing me, I knew they had allergic reactions to toads and I saw a toad hopping along the grass, I also knew that toads urinate when you pick them up so I waited for the dog to grow near.
Once he was within range, I picked up the toad and pointed it at him and it actually got him! He was probably frothing for a bit and sneezing after that