Blood War
The Blood War is a piece of Dungeons & Dragons lore that originated from the Planescape setting. It's Michael Moorcock's conflict between Law and Chaos, but quarantined to the fiends in the lower planes. The Baatezu (devils) represent Law; the Tanar'ri (demons) chaos, and everyone else down there exploits or avoids both sides. Like most wars, and like all evils, the Blood War cannot be entirely quarantined so it taints even angels if they are dumb enough to involve themselves.
In AD&D
In the 2nd edition the Blood War cast a massive shadow over the Planescape setting, and thus over the greater D&D meta-continuity as a whole. The Tanar'ri and the Baatezu, two infinite armies of evil outsiders (though the former is generally more infinite than the latter), wage a bloody war of mutual destruction over the definition of Evil; with demons firmly believing that evil is pointless if it doesn't arise from a place of passion and spontaneity, devils arguing that evil is pointless if it doesn't constantly keep long-term plans in mind. Essentially a philosophic argument between total and organized chaos.
The Blood War covers the entirety of the Lower Planes to one extent or another, five infinitely vast planes devoted to pure evil, and untold millions of Prime Material worlds. It is the source of both fiendish races' interest in corrupting and damning mortals, to have an infinite supply of resources and cannon fodder to continue to fight the war with. Another race of fiends known as the Yugoloths participate in the Blood War but don't owe allegiance to either side. All the denizens of the Upper Planes secretly feed and support the Blood War, bartering weapons and services to whichever side is currently losing; they know that if the war wasn't keeping the fiends at each others' throats, they would inevitably fall before the onslaught of pure evil. What they don't know is a stalemate is even worse; if neither evil side loses then the outcome would be just as bad.
The Blood War has always been a contentious aspect of the overall meta-setting. Support for it has only increased as the editions have advanced and pushed Planescape further and further out of the spotlight; fans have developed nostalgia for the concept. While there have always been individuals who disliked it (some thought it was ridiculously oversold as a setting element, some thought it was a real one-trick plot hook) a lot disliked the emphasis on the Blood War because it really made the cosmic forces of good seem like useless pushovers incapable of fighting evil themselves. Many hated it because it tended to take over the story whenever it got introduced.
Complicating things is the secret mastermind of the cosmic stalemate Asmodeus, king of the devils himself. This asshole wants the war to continue, as he is just using the whole thing as one huge distraction. Asmodeus is actually a decoy/avatar/persona created in order to give the illusion that the ruler of hell was a devil of near-godlike power, and thus less threatening Asmodeus is one of the twin serpents who created the planes, most likely older and more powerful than the gods themselves. If the good and probably even neutral gods knew what he really was, they'd first shit themselves and then immediately team up to wreck his shit forever which would of course unmake the universe. In his prime he might be a match for them, but the catch is that he's terribly injured from his fight with his lawful good equivalent long ago, and he needs to hide for as long as it takes to heal.
However the big catch is the blood war not as even as it might appear. If not for asmodeus directly causing the devils to fight in the blood war the demons would have destroyed the entire multiverse a long time ago as the demons are truly an infinite force of chaos. So Asmodeus not only does not want to win the war until he has healed his injuries from his fall but cannot lose the war for fear than everything would be destroyed. And if any of the gods of good were to intervene in the Blood war they would become corrupted so only the devils can keep the abyss in check.
So the most conniving devil in hell, who is also the ruler of hell, doesn't actually want to win his own war. Combine this with the complicity of the upper planes and the fact that the Yugoloths almost certainly want the War to stay in a stalemate so they can keep getting paid, and you have almost every power in the multiverse secretly conspiring to keep the Blood War going forever. Status quo is god with the Blood War, but there's a damn good (and evil) reason for it. This also creates the truly bizarre situation where basically the only side doing the right thing are the psychotically evil demons. But that's a stretch of logic too taut to put consideration on.
There's a whole boxed set for this in Planescape: Hellbound: The Blood War. Not for the faint of heart.
In 3.x
Because Planescape wasn't pushed so hard as a setting here, the Blood War became less important. It was still there, still canonical, but a lot less emphasis got placed on it.
In 4e
4e did a lot of cosmological changes, and the Blood War was one of them.
In 4e, the Blood War is shorn of its Alignment-fueled rationale. Instead, the Blood War is fought for a simpler reason. Demons want to destroy everything. Devils want to conquer everything. Naturally, the two goals are incompatible. Adding fuel to the Blood War is the fact that Asmodeus became the God of Sin through stealing a shard of the Heart of the Abyss, the force that created all demons. Naturally, they're kind of pissed off about this, while the devils want to steal the rest of it and become even more powerful.
More dramatically, the Blood War in 4e officially goes through a cycle of hot and cold war; the demons and devils fight reality-shaking battles in which trillions of outsiders and souls are utterly destroyed over centuries of endless war, then the fury dies down to more manageable levels as they rebuild their home planes and their ranks before starting it up again. This probably wouldn't piss off as many people as it does were it not for the fact that the books are officially written under the presumption that it's currently in one of its cold phases, though DMs are given full reign to have it go hot again in their campaign.
In 5e
The Blood War returned in 5th edition, covered in the first chapter of Mordenkainen's Tome of Foes. Ironically, although it has returned to being an omnipresent aspect of the Multiverse, in that there's always somebody fighting the Blood War somewhere, it's even more downplayed than in 4th edition; it's primarily restricted to the Abyss, to Baator and to the Prime Material, and whilst important, it's not the Sole Important Conflict like it could feel in AD&D. Furthermore, it's even more simplified in terms of its conflict, being literally a combination of tradition and viewpoints; both demons and devils want to conquer the multiverse, but the anarchistic arrogance of the demons and the elitist, hierarchy-obsessed mentality of the devils means they can't get along.
Also, it's theorized that the demons may actually have hit upon a perfect plan; concentrating on destroying the Nine Hells means they have a singular target to focus their collective rage against (which keeps them all flowing in roughly the same direction) and it keeps the Forces of Good off their back, because they're content to let evil destroy itself - if they did go after other targets, they'd lose what little cohesion their hordes have and would become a big target for devils and angels alike. Far smarter, in their opinion, to beat the devils first, and then look to the next major enemy.
The most unique addition to the lore in this edition is the idea of Balance, a group of cosmologically aware individuals who are so afraid of what might happen if the Blood War is brought to an end, even by the destruction of one fiendish race entirely, that they deliberately do whatever it takes to ensure that eternal stalemate. This is stated on the Tome to be Mordenkainen's goal, which means it lines up uncomfortably well with his reputation as a Stupid Neutral character - the book even nods to just how much hatred members of The Balance bring on themselves, and admits that some of its proponents are really using it as justification to pursue their own ambitions or power-hungry goals.
In the "Paradise Lost"-esque section, The Trial of Asmodeus, the titular character uses the Blood War as a defense, saying, essentially, "all lawful planes would be fucked if I wasn't there to beat back the demonic hordes!"
Interestingly enough, the books of the 5e setting make it very clear that the Blood War can actually have wildly differing states from time to time. If the PCs in Descent Into Avernus succeed in rescuing all of the NPCs they can, kill or redeem every named devil, etc, they can give the demons such a huge boost thanks to removing most of their opposition that the Blood War can push all the way down to the lower levels of the Nine Hells, which the book explicitly notes hasn't happened at any point in cosmic-level timescales. Of course, that isn't true, thanks to 4e, but it's still notable as an instance where the book itself calls out how a mid-level party can seriously overhaul an entire plane of existence like that. It also helps to highlight how badly overmatched Demon Lords are against even the lowest-ranked Archdevils. Zariel and Bel are the weakest Archdevils and they can kick the living Christ out of Yeenoghu and Baphomet and even Orcus if you go by RAW.
In Pathfinder
Perhaps because the Blood War isn't OGL-covered, Pathfinder makes no use of it. Demons and devils fight, yeah, but that's because they're evil, destructive bastards who sometimes get in each other's way. There's no big philosophical fight between the two. Indeed, as demons in Pathfinder are created from mortal sins, and devils live to corrupt mortals by committing sins, one can say that devils literally create demons.
This does not explain why, since the demons have vastly larger numbers than devils, same as in D&D if not more-so (The Great Beyond cosmology doesn't go into the whole 'balance' thing), they didn't destroy much of Golarion and the Prime Material Plane already, given how none of the Celestial races focuses on directly opposing them, though local gods are known to. In fact, demons and devils so rarely come up against each other in Pathfinder Adventures/Modules, that it often feels like Paizo is trying their darnedest to not even hint at there being something similar to the Blood War in their universe, and get sued by WOTC.
That said, there are three big fiendish conflicts in Pathfinder.
Firstly, the Abyss was originally home to a fiendish race called the Qlippoth (your basic Lovecraftian "this thing should not exist" monstrosities, also Chaotic Evil - expect tentacles), who are very peeved about how mortal sins caused demons to arise. To this end, they want to annihilate all demons and all mortals, to stop any new demons from being born.
Secondly, Daemons - Pathfinder's equivalent of Yugoloths, the "Neutral Evil fiends" - are characterised as omnicidal maniacs. They want to annihilate everything living, including ultimately themselves. As both demons and devils have no interest in killing literally everyone, they don't get on with daemons. At all. They will team up with each other and FUCKING CELESTIALS to stop Daemons from eating the river of souls they all use.
The last involves the chaotic Proteans, who are trying to dissolve the Abyss into the Maelstrom (the only plane rivaling it in size) believing its creation or opening into the rest of the multiverse to be caused by their mistake. Proteans warred with first the Qlippoth (the first great planar war, before any other planes besides the Maelstrom and Abyss spun out of the Maelstrom and into existence) and now the Demons. The Proteans spend about as much effort facing the Inevitables of the aggressively expansionist lawful plane of Axis, so they're not able to focus fully on either fight.
The one area Demon vs. Devil does come up in Golarion is in the devil controlled nation of Cheliax. There it is categorized merely as devils keeping hold on their power: Demons are merely a third party trying to take power from the Devils and must die because of that. A handful of mentions of state sponsored demon hunters exist, but virtually no information is given on them. Cheliax actually wants the World Wound, a planar rift spewing out Demons, to stay open since it means all the crusaders, paladins and good aligned clerics that would otherwise oppose the Devil run country go there to die instead.
Elsewhere
Talislanta has its own version, where "Oblivion" and "the Demonrealms" meet.