system
Given the following post, respond as if you're commenting on Reddit:
human
[LOTR] What happens to Gandalf after his battle with the Balrog?

What actually happens to Gandalf when he transforms from Gandalf the Grey to Gandalf the White? How does the transformation occur and what is the substantive difference in his powers? Does he somehow replace Saruman? What does Gandalf mean when he says he has been "sent back"?
gpt
So, Gandalf is a Maiar, which is basically a demi-god. He's immortal, but as one of the conditions of coming to Middle-earth, he was bound to a mortal body and a lot of restrictions on his power (the last time they didn't do this, they accidentally sunk a continent, so they were a bit more careful this time around). He died, his soul was released from his body, and he returned to Valinor. There, the Valar gave him permission to return again, in a new body with somewhat more power (moving from the Grey to the White) and a new mandate that included taking down Saruman.