This question already has an answer here:
After the fight in Dwarvish ruins (Moria), Gandalf the grey fell and:
rose as Gandalf the white.
What is the backstory of white wizards and grey ones?
Is there a order of wizards in this universe? What factors decide that the status of one wizard is to be elevated to a different color e.g. from Grey to white?
I'm new to LOTR universe so this may come across as a basic question.