First off, there are some spoilers for the end of the Emerald Nightmare raid coming up. I have not personally experienced the end of that raid yet (though check again on Tuesday when the Rift of Aln LFR wing opens up) but I'm a terrible spoiler junkie, so I've already heard a bit about what happens after we fight Xavius.
Just to be safe, I'll put up a spoiler cut here.
It appears that the Emerald Nightmare truly ends upon the defeat of Xavius. Players who finish the raid see the Dream restored to its ideal state, with formerly corrupted guardians like Ursoc and Elerethe Renferal restored to life and sanity within the Dream. There is even a Dream of Ysera there, meaning that she may be enjoying a sort of afterlife in the verdant realm.
But there are definitely some questions that we're left with.
We know, thanks to Chronicle, that the Nightmare was the result of a failed attempt by Night Elf Druids to plant a new world tree in Northrend. This roots of this tree, Vordrassil (or as it's known now, the Grizzlemaw) broke through into Yogg-Saron's imprisoned form and the Old God was able to introduce corruption through Vordrassil into the Dream.
The Dream itself, regardless of its corruption by the Old Gods, is already a somewhat mysterious thing. Chronicle states that Freya either created it (much like Ra-Den and Helya created the Elemental Planes) or she may have simply opened a way into it. One could speculate that the Emerald Dream is in fact the Titan Azeroth's dream as she grows embryonic within the planet. It is, after all, a sort of pristine image of the planet as it should naturally be - we often talk about how it is devoid of signs of humanoid civilization (though we do see some of the towers of Thunder Bluff - itself a very new city - in the Mulgore section of the Nightmare) but it's probable that, in its pure form, the even more notable absence within the dream is the absence of the Old Gods. In the Dream, Azeroth is whole - not only unaffected by the Sundering but probably also the tumor-like Old Gods and the horrible wound that is the Well of Eternity.
Given that the Old Gods' purpose in existence is to corrupt the Titan Azeroth, it makes perfect sense that they would try to not only corrupt her body, but also her dreaming mind.
So here's a really odd analogy: Druids sleep in order to commune with the dream. While this isn't reflected in game (even using Dreamwalk to get to the Dreamgrove or other locations around Azeroth doesn't leave your body sleeping wherever you teleported from) it's definitely part of the lore. Over the ten thousand years after the Sundering until the Third War, Malfurion and his fellow druids (who, at the time of the RTS games, seemed to mean every male Night Elf) slept underground in these druidic barrows you find all around the world.
The druids do this so that their spirits can walk in the dream while their bodies lie dormant (literally.) What if they aren't the only ones to enter the dream this way?
Yogg-Saron is the one who introduced the Nightmare into the Emerald Dream, but for some reason we don't really associate the Nightmare with him - instead we associate it with the one living Old God we have yet to see in-game (well, technically we've seen him Hearthstone.) N'Zoth is apparently the force that really powers the Nightmare, and Xavius, if anything, is being controlled by him.
Now, I've written plenty about the ambiguity over who Xavius - who was transformed into a demon by Sargeras - is actually working for, given that, in theory, the Old Gods and the Burning Legion should be 100% opposed to one another (similar questions arise when talking about Azshara.) But let's just set that aside for now and accept that N'Zoth is most definitely invested in the Nightmare.
But we've cleared (or will soon clear) the Emerald Nightmare, and while we've certainly fought some clearly Old God-related stuff, N'Zoth wasn't there. We beat Xavius and, well, there is no sign of N'Zoth.
Here's the thing - Old Gods can't really move, as they're continent-sized monstrosities embedded in the crust of the planet. Yet we've gotten two locations for N'Zoth - the Rift of Aln (which is where we fight Xavius and appears to be a featureless grey void) and some place called Ny'alotha.
The Puzzle Box of Yogg-Saron is a toy that you can get via Nerubian Archaeology, and at least until Ilgynoth showed up in the Emerald Nightmare, was the absolute best source for cryptic hints at Old God lore.
While the box may have been created by Yogg-Saron, it seems to mostly be about N'Zoth.
What purpose did it serve? Well, we do know that N'Zoth used to send his armies to fight against those of C'thun and Yogg-Saron. I don't know that that really means they were enemies, exactly, as these are beings of pure concentrated darkness and insanity, so war was probably considered an end in and of itself. Maybe this Puzzle Box was meant as a piece of intelligence, or, maybe more likely, a tool to drive mortals to madness with its riddles.
Anyway, the various quotes of the Puzzle-Box suggest that N'Zoth exists below the ocean in a place called Ny'alotha. There was some speculation that Ny'alotha was near or at least linked to Vashj'ir, given that the massive creature L'ghorek there is being tormented by enormous tentacles from an unknown source and also that Ozumat, the huge kraken that aids the Naga in their campaign, actually looks very similar to the image of N'Zoth we've now gotten in Hearthstone.
So how can N'Zoth be in Ny'alotha as well as the Rift of Aln?
Because N'Zoth is actually, in a twisted way, a Druid.
First, let's just take a quick tangent here and talk about how a lot of this is a clear literary reference to H. P. Lovecraft's "The Call of C'thulhu." If you're somehow reading an in-depth discussion of video game lore and yet aren't nerdy enough to have heard of this novella, it's the quintessential story of cosmic horror, and recounts the narrator's attempts to unravel the myths surrounding the eponymous figure. Cthulhu is known to be so alien that it persists in a state of death that is somehow as impermanent as sleep, resting beneath the ocean in a sunken city called Rl'yeh that sometimes rises from the depths and seems constructed out of geometry that does not make sense to human eyes.
Ny'alotha seems likely to be Blizzard's take on Rl'yeh. But given what we know about sleep and dreaming and N'Zoth's common association with the Emerald Nightmare, things begin to fall into place in interesting ways.
Upon killing Il'gynoth, the monster says "N'zoth, I go to Ny'alotha." Much as demons and elementals project themselves into the physical world from their native realms, Druids effectively project themselves into the Dream from the physical world. What if Il'gynoth is not, as we have been told, simply a manifestation of the Nightmare corruption, but is actually a creation of the Old Gods that has projected itself into the Dream, perhaps to help in the generation of the Nightmare, like a sort of eldritch anti-Druid?
After all, Ny'alotha seems like it might be a real, physical place on Azeroth (though it's bound to be a very weird one.) If Il'gynoth were just some manifestation of corruption, wouldn't it just dissipate upon destruction in the Dream? Instead, it claims that it's going to a physical place in the physical world.
Which brings us to N'zoth and why it can be considered the Old God affiliated with the Nightmare even when Yogg-Saron was the one who created it.
The Old Gods are totally alien in nature, but they do work toward a common goal. And even if they warred with one another during the era of the Black Empire, that does not mean that they were truly at odds.
Yogg-Saron was probably the busiest of the Old Gods. In addition to corrupting Vordrassil, he was also hard at work turning Loken into a murderer and traitor. He was imprisoned in Ulduar, which was really the main headquarters for the operations of the planet, meaning that, yes, he was well-positioned to cause chaos (he got Loken to introduce the Curse of Flesh, for example,) but that means that maybe the effort to corrupt the Dream fell to a different Old God.
I'm thinking that N'Zoth took up that task, and developed a twisted reflection of Druidism in order to commune with the Emerald Dream. But of course rather than preserve and learn from it, its goal was to corrupt it.
In a bizarre turn, N'Zoth becomes the Malfurion, or perhaps the Cenarius of the Nightmare side of things, with Xavius and maybe Il'gynoth serving as his disciples.
So why don't we see N'Zoth at work corrupting the Dream when we storm into the place? Because N'zoth is no longer asleep. After untold years (I don't think we actually know when the Nightmare began, though it was probably after the War of the Ancients) N'Zoth is awake again. What woke him up? Well, there is this massive demonic invasion going on, for one thing. Also the Cataclysm a few years before that.
What does this mean, then? Well, that's a good question. I can't really imagine Blizzard ever going deeper into the Emerald Nightmare setting than they already have, as it's pretty hard to keep going to the well after you've named a raid after a thing. But on the other hand, while the Nightmare might have been defeated, its source is now free to start sewing chaos in the physical world once again.