Most of the action takes place in the Land of Oz, which is a very strange place. But the protagonist, Dorothy, hails from a land that many of us know very well, and that's the good old U.S. of A. Dorothy is from Kansas (a farm girl no less!) and her family's homestead has a real Great Depression vibe:
When Dorothy stood in the doorway and looked around, she could see nothing but the great gray prairie on every side.... The sun had baked the plowed land into a gray mass, with little cracks running through it. Even the grass was not green, for the sun had burned the tops of the long blades until they were the same gray color to be seen everywhere. Once the house had been painted, but the sun blistered the paint and the rains washed it away, and now the house was as dull and gray as everything. (1.2)
The action doesn't take place during the Great Depression, though. (In fact, it was written some 30 years before Black Tuesday.) The author's description is vague because he didn't want to situate the story in a specific time period. To make the book feel timeless, he spends most of the story in Oz—a place that doesn't actually exist. Then he starts and ends the story in the "real" world to make all the strange things that happen in Oz seem more believable. Though we spend fewer than five pages in Kansas, it's important to the setting because it grounds the rest of the story.
Where is Oz, anyway? All we really know is that it's a full day's journey as the house (or the hot-air balloon) flies. Though it's a fanciful place with talking lions and flying monkeys, it is not located in the land of imagination. (Fans of the movie might remember that Oz was just part of Dorothy's dream.) Oz exists, physically speaking, though it is "cut off from all the rest of the world" (2.31), whatever that means.
After Dorothy's house lands in Oz, it's immediately obvious that she's not in Kansas anymore. Oz is "a country of marvelous beauty" (2.3) with the "queerest people [Dorothy] had ever seen" (2.4). As soon as Dorothy steps out of her front door, she is surrounded by Munchkins who believe her to be a sorceress. She quickly learns that Oz is a place beyond rules because it "has never been civilized" (2.31). Just as there are good witches and wicked witches, the land itself seems like a place of extremes. It's "sometimes pleasant and sometimes dark and terrible" (2.56), but it's always interesting. Kansas, where Dorothy could stand "in the doorway and…see nothing but the great gray prairie on every side" (1.2), is neither interesting, nor beautiful, nor particularly pleasant.
And yet, Dorothy is awfully homesick the entire time she's a tourist in Oz. Wherever she goes, her heart is in Kansas. One of the most famous lines in the book is when she tells the Scarecrow, "There is no place like home" (4.8). In a sense, then, setting helps define not just her character, but the emotional core of the book. While Dorothy's homecoming in the final chapter is very brief—just three paragraphs—it's satisfying to see her back where she belongs.