Dorothy chases Toto after he runs after a kitten in the crowd, and before she can make it back to the balloon the ropes break leaving the Wizard to rise and float away alone.
Dorothy turns to the Winged Monkeys to carry her and Toto home, but they cannot cross the desert surrounding Oz. The citizens of the Emerald City advise that Glinda, the Good Witch of the South, may be able to send Dorothy and Toto home. They, the Scarecrow, the Tin Woodman, and the Cowardly Lion journey to Glinda's palace in the Quadling Country. Together they escape the Fighting Trees, dodge the Hammerheads, and tread carefully through the China Country. The Cowardly Lion kills a giant spider which is terrorizing the animals in a forest, and he agrees to return there to rule them after Dorothy returns to Kansas.
At Glinda's palace, the travelers are greeted warmly, and it is revealed by Glinda that Dorothy had the power to go home all along. The Silver Shoes she wears can take her anywhere she wishes to go. She tearfully embraces her friends—all of whom will be returned, through Glinda's use of the Golden Cap, to their respective sovereignties: the Scarecrow to the Emerald City, the Tin Woodman to the Winkie Country, and the Cowardly Lion to the forest. Then she will give the Cap to the king of the Winged Monkeys, so they will never be under its spell again. Dorothy and Toto return to Kansas and a joyful family reunion.
https://en.wikipedia.org/wiki/The_Wonderful_Wizard_of_Oz