The wizard who guides Bilbo and the dwarves in J.R.R. Tolkien's The Hobbit is Gandalf.
Gandalf arranges Bilbo Baggins's involvement in Thorin Oakenshield's expedition to the Lonely Mountain. He recognizes that Bilbo's quiet skills, courage, and knowledge of the Shire could be valuable to the company. During the journey, Gandalf provides advice, protects the travelers, and confronts major dangers.
In The Lord of the Rings, Gandalf becomes central to the struggle against Sauron. He is first known as Gandalf the Grey and later returns as Gandalf the White after confronting the Balrog on the Bridge of Khazad-dûm.
Gandalf is one of the Istari, supernatural beings sent to Middle-earth to oppose Sauron. He is not the same character as Saruman, the chief of the order, whose betrayal becomes a major part of the later story.