In each of the Alice books, we begin with a brief glimpse of the "real world" where Alice lives a humdrum domestic life with her older sister, nurse, and other family members. It's important to remember that this "real world" isn't our world today. Instead, it's Victorian England – the regimented life of an upper-middle-class British child in the nineteenth century.
As a girl in the England of the mid-1800s, Alice would have been sheltered from most of the realities of the world around her, like industrialization and poverty, and anything that might have been considered odd, awkward, improper, or silly. She would always have been primly dressed in lots of complicated uncomfortable clothes. She would have learned lessons, partly from a tutor and partly at school, but they would have been almost entirely rote learning – memorizing poems to improve her morals, memorizing songs to entertain adults, and memorizing sums to make her a useful housekeeper when she grew up and married. These arbitrary, stuffy rules sound lame, don't they? Lewis Carroll thought so, too. That's why this boring "real world" quickly dissolves away into a fantasy world of Alice's own creation.
In Alice's Adventures in Wonderland, the fantasy world is, you guessed it, Wonderland. Wonderland is just what it sounds like – a land of wonders, of strange and curious creatures doing strange and curious things. It's also a place where sense and nonsense meet, where a turn of phrase becomes a literal thing in the world. For example, when Alice talks about "beating time" in her music class, the characters in the Mad Tea Party think she's literally talking about hitting a man who personifies Time. Basically, in Wonderland, if you can speak it, you can see it.
Wonderland also seems to have a physical location – underground, where Alice falls after tumbling down the rabbit hole – as indicated by the book's original title, Alice's Adventures Underground. Yet Wonderland may just be a dream-world, since Alice wakes up at the end of her journey.
On occasion, Wonderland becomes a parody of the ridiculous strictures of the Victorian England that Alice inhabits. For example, when Alice and a group of animals need to get dry after falling into a pool, the Dodo arranges a "Caucus-race," a political convention, which he says is the driest thing he knows. That's Lewis Carroll nudging you in the ribs, saying "Isn't politics dull and boring?"
Again, at the Mad Tea Party, Carroll is satirizing the Victorian tradition of afternoon tea – a highly formalized occasion on which every aspect of the mini-meal was ordered by social custom, from who got to pour the tea to who got the first plate of little cakes. Carroll throws this fussiness overboard as he depicts the Hatter, Hare, and Dormouse (not to mention Alice herself) eating and drinking from dirty plates, spilling things, and making rude remarks right at the table. To us, it seems a little silly; to Victorians, it would have been an almost shocking breach of propriety, saved only by how fantastic the situation is – the fact that we're in Wonderland, where anything goes.
Looking-Glass World is similar to Wonderland, but perhaps not quite the same. Wonderland is quirky, but Looking-Glass World is actually backwards in many ways. The White Queen's memory works in both directions, and she experiences time in reverse, bleeding before she pricks herself with a pin. The print in books is backwards, and in order to stay still you have to run furiously. Like a bad science fiction story, Through the Looking-Glass is inconsistent with these different kinds of backward-ness. Alice doesn't always have to run to stand still – it just happens once, because it's funny. And yet there's something different about the mirror-image world in this book, something that depends more on a silly kind of inverted logic than the madness of Wonderland.