This post contains spoilers for Season 6, Episode 2 of Game of Thrones but NO book spoilers.
Well, that was easier than expected. Melisandre gave Jon Snow a haircut, spoke some Valyrian and all of a sudden the Lord Commander lives again? Well, it's probably more complicated than that. Here's what we know about the magic used in this long-awaited resurrection.
Despite the doubts Melisandre expresses to Davos in the previous scene, she does appeal to the Lord of the Light to resurrect Jon Snow. Notably, she uses a process that's different than what was used to bring back Beric Dondarrion of the Brotherhood Without Banners, the only other person we've seen resurrected on the show. (The Mountain never actually dies, and we'll categorize wights and White Walkers as "the undead" rather than "the living.")
In a season three fight witnessed by Arya, the Hound kills Beric. Thoros of Myr rushes to Beric's side and makes a plea to the Lord of Light in the common tongue: "Bring him back from death and darkness. His flame has been extinguished. Restore it." As far as we see Thoros doesn't cut and burn Beric's hair, and he doesn't speak in Valyrian as Melisandre did. It works nonetheless, and Beric rises from the dead.
Presumably, Melisandre is saying the same words as Thoros, but in Valyrian. (Someone who has taken the time to actually learn Valyrian can fact-check me on this).
We don't know yet what effect the resurrection process will have on Jon Snow. Thoros brings Beric back to life six different times, and each time is more difficult than the last. "Every time I come back, I'm a bit less," Beric tells Arya.
Now if bringing someone back is as simple as an incantation, why doesn't it happen all the time? Perhaps not everyone has that power. Thoros says he's just the "lucky drunk who says the words," and it's really the Lord of Light that repeatedly brings Beric back, but we haven't seen anyone else besides Melisandre try to do it. We know Melisandre has some sort of magical power—you can't just create a murderous smoke baby with smoke and mirrors. Perhaps Thoros does as well.
Though there's a lot left to be explained, we are now able to eliminate many other fan theories about how and when Jon Snow would return. The necklace played no role. He did not turn into a White Walker. And though Ghost featured prominently in the resurrection scene, it doesn't seem like Jon warged into him before his death. (In the post-show commentary, showrunner David Benioff mentions that Ghost has a connection to Jon and thus senses he's returning before Jon actually takes his first breath.)
For a moment, it seemed we might get an answer as to whether Jon Snow is part Valyrian (details on that theory here) when they talked of burning his body. If he was Valyrian royalty like Dany, he would have presumably survived such a fire. But that, perhaps, is a question for another day.