Ever since we first heard Obi-Wan Kenobi calling to Luke Skywalker from beyond the grave, we began to understand just what the old Jedi Master meant when he told his former pupil turned rival, "If you strike me down, I shall become more powerful than you can imagine." Force Spirits are one of the coolest things about Star Wars. So what's up with them, anyway?
Decades before people were screaming "Your Snoke Theory Sucks" at each other, one of the greatest mysteries in Star Wars was this: why was it that both Obi-Wan Kenobi and Yoda disappeared at death, but Darth Vader did not? We saw Luke burn his father's body on Endor just as we would see Qui Gon Jinn's burned in Episode I. Prepare for spoilers from here on out.
The Last Jedi opened up even more Force Ghost possibilities, with Yoda calling down lightning to set the Force tree on fire on Ahch-to. Of course, it seemed that the last remaining books of Jedi wisdom were burned as well, but eagle eyed viewers spotted those books on the Millennium Falcon, safely with Rey. "Wisdom they held, but that library contained nothing that the girl Rey does not already possess." A-ha! It seems that Yoda's last words in The Last Jedi can in fact be taken quite literally.
It's a cruel twist of fate when we learn in Episode III: Revenge of the Sith that Darth Sidious was able to seduce young Anakin Skywalker to the Dark Side with the promise of cheating death. In one of the movie's strongest scenes, the future Emperor relates the story of Darth Plagueis the Wise, a Sith Lord who learned to conquer death. It's strongly implied this was Palpatine's own master, who he murdered in his sleep. At first it sounds like he knows the secret, then it becomes about discovering the secret together, which includes Anakin having to do a bunch of evil murderous things as Darth Vader to become "strong enough with the Dark Side." Of course, tragically, Anakin's mission to save his wife from death becomes the very thing that causes her death, which he'd seen in vision, in the first place.
In the same movie, Yoda reveals to Obi-Wan that Qui-Gon Jinn has learned how to maintain his consciousness after death. He tells him he'll learn the training Qui-Gon has communicated through The Force. There's even a deleted scene, featuring a placeholder voiceover from another actor, where a meditating Yoda communes with Obi-Wan's old master.
Qui-Gon's voice called out to Anakin in Attack of the Clones, as the Padawan learner indulges the Dark Side with his murderous revenge on the Tusken Raiders who killed his mother. (Yoda heard this but didn't understand it.) The Clone Wars series explored this all in even greater detail, with Liam Neeson even reprising the role.
It turns out this was something Qui-Gon had been studying before his death. However, he was never able to complete his training. In the excellent Clone Wars episode "Ghosts of Mortiis," Qui-Gon appears as a Force Ghost, first to Obi-Wan and then to Anakin. He explains to Obi-Wan that the Force strong planet acted as a conduit that amplified Jinn's oneness with the Force, allowing him to manifest himself in a form that could be both seen and heard by his old friends.
Though the experience did seem to cause Skywalker to question the Jedi's teachings about the nature of death, which held that it was impossible to retain one's consciousness, Kenobi was convinced the appearance of his old Master was simply an illusion conjured by the inhabitants of Mortiis, and told the Jedi Council as much.
But Yoda began to hear the voice of Qui-Gon Jinn himself toward the end of the Clone Wars. Anakin briefly heard it, too. After spending a day in meditation unsuccessfully attempting to contact Qui-Gon, the Jedi Council came to believe Yoda was suffering from a spiritual attack by the Sith; the voice of Qui-Gon was probably a trick and Yoda could very well have fallen under the influence of the Dark Side.
Yoda is placed under heavy guard and monitored. With the help of Anakin and R2-D2, Yoda sneaks out of the Jedi Temple at Qui-Gon's urging, following his old friend's voice to the Force heavy planet of Dagobah. While there, he experiences a dark vision related to the impending end of the Clone Wars, one where the Sith will win.
Qui-Gon explains that the energy of the Living Force feeds into the Cosmic Force and that special training will enable a Jedi to maintain consciousness after death. Qui-Gon next sends Yoda to a planet that's likely the Origin of All-Life in the galaxy. There, Yoda undergoes rigorous testing by the mysterious Five Priestesses, who hold the secrets to immortality. They are manifestations of the Living Force itself.
"Destiny," the conclusion of the extremely excellent three-episode story arc, took place on the mysterious ancient Sith home world, Moraband. Across the galaxy, Sidious used Sith sorcery to launch an attack on Yoda, aided by his apprentice's onetime connection to the Jedi Grand Master. Together, Sidious and Darth Tyranus tempted Yoda with visions of many of the events that would play out in Revenge of the Sith. Yoda of course bested them, passing all of his trials with the Living Force.
As we learn in Episode III, Yoda continued to receive training from Qui-Gon.
In "Master and Apprentice," one of the short stories in the new canon anthology Star Wars: From a Certain Point of View, we learn that Qui-Gon can now materialize as more than a voice of swirling lights and more like the other apparitions we've seen, even without the aid of a conduit like Mortiis. In this story, he appears to Obi-Wan, just after Luke runs off to check on his Uncle Owen and Aunt Beru. In the same book, the story "Time of Death" is told by Kenobi, at the moment Vader strikes him down.
Presumably it was Yoda and Obi-Wan who taught the Force Ghost ability to Anakin, posthumously, following Skywalker's redemption aboard the second Death Star, after the seeming fulfillment of his destiny with the final destruction of the Sith.
As it seems only Jedi can merge with the Living Force and manifest after death, this would perhaps explain why Lucas made the controversial decision to replace the older Force Ghost Anakin seen at the end of Return of the Jedi with the younger version of the prequels, while keeping Obi-Wan and Yoda in older forms. The theory being that Anakin reverted to the Jedi he was before Vader, hence his younger look.
Interestingly, "Master and Apprentice" explains that not long before Obi-Wan's death, Qui-Gon was able to see him as many ages at once. "He is not limited to human sight any longer," the story says. "He also sees the confident general of the Clone Wars, the strong young Padawan who followed his master into battle, even the rebellious little boy at the Temple that no Master was in any hurry to train. They are all equally part of Obi-Wan, each stage of his existence vivid in this moment."