The Dagor Bragollach (Battle of Sudden Flame) was a battle in JRR Tolkien's Silmarillion. The battle was fought between the Elves, primarily the Noldor, and Morgoth. Although it is described as a "battle" in the text, in modern terms it might be termed a "campaign", since it seems to have lasted a few months to a year. Like much in The Silmarillion or The Lord of the Rings, it can be read as either mythology or history, and makes sense as either one.
At the time that the Battle of Sudden Flame begin, the wars in Beleriand had been going on for 450 years (or so), and would continue for another 100. Although it occurs fairly late in that scale of time, it occurs fairly early in the book, because most of the dramatic action in The Silmarillion happens after this battle has been fought. Before the battle is fought, the elves of Beleriand, led by the Noldor, had been the dominant force, besieging Angband and growing more wealthy and sophisticated. The battle was called "sudden flame" because it was launched with walls of fire, followed by dragons and more conventional forces. Even though this is put forward in a mythological context, it is historically not hard to imagine: a political alliance that was once the leading power being caught unaware by an enemy that had grown stronger and more technologically sophisticated is a believable scenario.
Due to the bravery and strength of the Noldor and their allies, the battle did not succeed in totally destroying them. What it did do is destroy their cohesion as a military and political alliance. Although Morgoth was not able to destroy every elvish fortress or kingdom, he was able to break open enough that his forces could raid and threaten at will. Any resistance to Morgoth after this point was uncoordinated, up until the time of the Nirnaeth Arnoediad. Part of this has to do with the fact that the High King and commander of the Noldor, Fingolfin, raced to the doors of Angband to challenge Morgoth to single combat, a battle he inevitably lost. Fingolfin was a strong leader who seemed to have no rivals amongst the elves, and his death seems to have left the various members of the alliance with no one to follow. And his death, while again mythologized (single combat with the devil is not a feature of most modern wars) is also in some ways a very historically realistic scenario. Fingolfin attacked in a fit of "madness", while it is possible that if he had decided to fight conservatively and try to constrain the losses, the battle might have not ended so badly. Wildly counterattacking instead of going to the effort to make a tedious defense is a military mistake that has been made.
Morgoth's inability to follow up on his victory and totally destroy the Noldor is again something that makes sense both mythologically and historically. Mythologically, he does not do so because even though he was originally angelic in nature, he has fallen and "alone of the Valar knows fear", especially after Fingolfin wounded him. In military terms, the tenacity of the resistance made him believe his opponents had an ability to resist along with a will to resist, and so he settled for scattering them and breaking the siege, rather than an all out military campaign to destroy them.
This description of the battle analyses it from one perspective, but for a full understanding of how it is one more piece of the subtle tragedy that Tolkien is weaving, the Silmarillion must be read, preferably multiple times.