By keeping them away from one another. You can't keep two rodents of the same sex in the same cage.
^----That's not true. Don't keep them away from one another. You can keep two same sex rats in the same cage. They're probably just establishing a pecking order. Always follow the rule, "No harm, no foul" And if one is seriously injured, THEN you keep them away from one another.
I agree, we have two male rats in one cage and three females in another cage, they all fight, but only to clean each other. Its most likely a dominance thing, nothing to worry about.