dog and pull it away. don’t do this! it is quite likely that your dog will turn round and bite you, thinking it is being attacked from behind. or you will get bitten by the other dog.
shout! a loud, fierce “get off!” or similar might startle the dogs into stopping.
pick up your dog. if you have a small dog being attacked by a large one, removing your dog is a good idea, if at all possible.
try to force yourself between the two dogs. i would be reluctant to do this personally, but you might feel able to. if your dog is on a lead, you can try physically pulling it 