By whatever means necessary as long as it doesn’t involve me getting in the middle.
If you are by yourself and both dogs are leashed, grab one leash, tie it to something, grab other leash and pull backwards until they are separated.
If one is leashed, grab the leash, tie it something, grab dog #2’s back legs (be careful, they may turn around to bite you, in which case, let go and try another method), pull backward until separated. Put dog #2 in another room.
If everyone is free, I’ll start by yelling. Sometimes if you have good verbal control, it stops the fighting until you can get one out of there. Then use what you have. I’ve used a broom to get in between them long enough to get one out of the room. I’ve used water. I picked a 90# pitbull up one day and tossed him in a kennel (not the smartest move ever, was working on instinct, not brain). Once I had to let them fight it out while I went and got help. That wasn’t fun. Or pretty. It’s easier if you have help. If you have leashes handy on unleashed dogs, you can get the leash around dog one’s tummy, clip it to fence, get leash around dog 2’s tummy and pull backwards. Much safer that way, no hands on dogs to get redirected aggression. That works well if you have leashes or ropes handy.
What doesn’t work is beating them with anything, it just makes them more mad. (Unless you are breaking up one of the recent fights in my house. In which case, I beat them with a pair of shorts and yelled, and that stopped it, but I normally have very good verbal control of the guys).
Now with all that, it sounds like I have dogs fighting all the time. Not really, but I do work in an animal shelter, and in the course of having 50+ dogs with unknown temperaments in one place, you get fights. Especially since they are being handled by volunteers who don’t always pay attention when we ask them not to socialize the dogs with one another.