Let go of your dog's leash! Your dog cannot defend himself if you have a firm hold on his leash. Let your dog run away from the attacking dog or let him defend himself by letting go of the leash.
Remain calm because any screaming or yelling you do will make the attacking dog's prey drive kick into high gear and you will have a major dog fight on your hands if you lose control and freak out.
You should not try to intervene in the dog fight by trying to get between the dogs and break up the fight. You will sustain a nasty bite if you try to pull the dogs apart. Dogs know the ins and outs of fighting and more often than not one dog just surrenders and the other dog takes off.
No way do you want the dog that attacked your dog to continue to be a threat to other dogs in the area. Try your best to find out who owns the dog and take steps to prevent repeat attacks by contacting the authorities and the dog's owner.
You can often redirect a dog's attention is the dog is in attack mode by always having doggie treats on your person. When a dog looks like he is preparing to levy an attack on your dog, toss those treats so they scatter. The attacking dog will more often go after those tasty treats rather than your pup.
select one here...