Almost all cards in Magic: The Gathering are divided into one of five categories, defined by certain characteristics and assigned a colour. The five colours are seen on the back of the cards in a pentangle. The characters and creatures associated with any particular colour are hated by the colours on either of the nearer points, but even they will ally to fight against a colour further away (physically and thematically) from one of them.
This forms a significant part of the dynamic for the good guys in the Archenemy variant (since they can easily be colors that either do or would hate each other slightly less than they hate the main opponent).
The events of the Zendikar block have the vampires, elves, humans, Kor, minotaurs, goblins, merfolk and what-have-you uniting against the Eldrazi).
In the Scars of Mirrodin block, the Mirran forces in all five colors were forced to team up against Phyrexia... although the Black-aligned section was wiped out by the second set, and Phyrexia won in the end.
Werewolf: The Forsaken does the same thing as well, with the Forsaken and the Pure reluctantly willing to put aside differences and put down Bale Hounds or the Idigam whenever they pop up. An entire Lodge, the Lodge of the Hunt, exists to invoke this trope, bringing together werewolves who have a common Arch-Enemy.
Warhammer 40,000 very, very occasionally has instances where the more reasonable factions will hold off on killing each other to deal with a mutual threat. For a few minutes, anyway.
This most common variant occurs between forces of the Imperium, Eldar, and Tau against Tyranids, Necrons, or Chaos, and matching temporary alliances may occur between Chaos, Orks, and Dark Eldar, as prominently seen during Dawn of War: Winter Assault.
The Eldar, being who they are, will often manipulate any allies they do make so that they take the brunt of the fighting (and thus causalities), in essence back-stabbing their allies during the alliance, as well as overtly so 5 minutes before its usefulness ends. Their evil cousins, the Dark Eldar, pretty much always do the same.
It wouldn't be too much to suggest that this is the standard Ork state of being. Individual Orks are naturally hostile to everything else, even each other, but they will form into tribes to fight other tribes, and no matter how much the Ork tribes fight each other, they'll nearly always join forces to fight non-Orks.
Dawn of War II has a new mode which exemplifies this, known as "The Last Stand", where a Space Marine Captain, an Ork Mekboy and an Eldar Farseer cooperate to Hold the Line against a swarm of enemies. The Chaos Rising expansion throws the Chaos Sorcerer and the Tyranid Hive Tyrant into the mix of heroes in the play mode, which technically cements— if it wasn't apparent with the widely opposing team we had before— that the game mode is not to be taken as canon, especially when a loyalist Marine cooperates with a Chaos Marine in any way.
Rules for the 6th Edition allow "allies"; if the player's army allows, they can take a HQ and a Troop choice (or more if they really want to) from another army. Specifically, the categories Desperate Allies and Unholy Alliance allow players to invoke this trope if they want. The example given involved the Blood Angels fighting alongside the Necrons to stop a Tyranid invasion, without either side backstabbing the other, which led to many cries of "WAAARD!!!" among the fandom.
In Warhammer, this comes up often between the Empire and Bretonnia, who often join forces against the Greenskins, Skaven and Chaos despite the two human nations being rivals. The Empire has also in their past wars against Chaos received some rather... unexpected help from the Vampire Counts and their undead minions, though here the dynamic is more like a rancher protecting his cattle from wolves and bears even though he fully plans to slaughter them later.
In Paranoia, even if someone's ideology is directly opposed to yours (Psion vs. Anti-Mutant, Corpore Metal vs. Frankenstein Destroyers), alliances can always shift to suit the demands of the moment. You can always hose them later.
Will the Traditions fight alongside the Technocracy?
Will the Seelie fight alongside the Unseelie?
...and will the Malkavians fight alongside the Martians?
Just about all the Successor States in BattleTech was quite happy to blow each other to kingdom come. And then the Clans came, and all of a sudden, Arch Enemies were forming alliances to stop the threat. A few decades later, the Word of Blake started nuking everyone. So the Successor States ended up forming an alliance with the Clans to nuke the Blakists back.
Heroes in Beast: The Primordial will happily team up with every other race in the New World of Darkness for the sake of hunting down and killing Beasts. This is intended to show just why they are Designated Heroes; they are so obsessive that they will gladly ally with actually evil monsters to kill a harmless Beast, simply because they are just that fixated on killing Beasts that they regard other races as harmless.
In Rocket Age when humanity started pushing its interests on Mars many warring city states put aside their differences to combat the new threat. Thus far this hasn't worked so well for them. There are also some adventures where the heroes could find themselves shoulder to shoulder with their rivals and enemies, at least for a little while.