When dogs fight, it isn't necessarily to inflict harm, just to establish dominance. Your dogs will vie for control over resources like food and toys, over who is the pack leader and over your attention. When you think that a fight is getting out of hand or has simply gone on long enough, it's time to break it up and show your pooches that you won't stand for their misbehavior. Discipline, not punishment, is the key to establishing order and showing your dogs that the only one who will ever win a fight is you.
Interrupt the fight with an environmental distraction. This may be as simple as clanging some pots and pans or throwing a bucket of cold water on the animals. Basically, you need to help them snap out of it.
Separate the animals right away. Don't just put them on opposite sides of the room, either -- make sure that there is a physical barrier of some kind between them or that they are both crated. Wait until they are visibly calmed down before you reintroduce them.
Take away whatever resource they seem to be fighting over. For example, if they're fighting over a toy, put it away. If they're fighting over your attention, leave them both alone. You are showing them that if they fight over something, neither will get it.
Discipline your dogs by instituting strict order in your household. Dogs thrive on consistency, predictable scheduling and even distribution of resources. If your dogs fight at mealtime, for example, feed them at the same time every day using two separate bowls in two separate rooms. If they fight over your attention, spend equal time with them, including time spent with the two together. Walking them together, for example, prevents feelings of jealousy.
Institute discipline in your distribution of treats and other high-value items. For example, don't leave toys out on the floor for your dogs to fight over. Have specially designated toys for playtime, and only give them to your dogs during playtime. Take them away when your dogs are finished. This is demonstrative of the difference between disciplining and punishing -- discipline is a sense of order and rules, not strictly a model of corrective behavior.