The story opens in Charlie Bucket's house, which is described as "a small wooden house on the edge of a great town." Dahl says that it wasn't large enough for all seven people who lived there; there were two rooms and one bed. All four of Charlie's grandparents share the bed.
The house is comfortable in the summer but freezing in the winter. They're too poor to afford better lodgings because Charlie's father is the only one who works and he has to support seven people on his low-paid job as a toothpaste cap-screwer.
Charlie walks through his unnamed town every day fantasizing about chocolate. He stops at the chocolate shop to look at what they have to offer, though he can't afford it. It's there that he eventually buys the chocolate bar with the golden ticket.
The primary setting in the novel is Wonka's Chocolate Factory. It's protected with large iron gates and a wall. From the outside, can hear strange whizzing sounds, see smoke rising from the chimneys, and smell chocolate from half a mile away. Charlie's family claims that it's the largest one in the world; they say it's fifty times as big as any other chocolate factory.
When Charlie wins the contest and is allowed to go inside, he finds that the factory is a bizarre and exciting place—but also dangerous. There's a chocolate river; there's a room where everything is edible and chocolate is mixed by a waterfall. The factory has a mountain made of fudge, a lake of hot caramel, and a village of Oompa-Loompas. There's also a room that houses Television Chocolate where the chocolate "works by television" according to Willy Wonka. When a young boy tries to go into the television—which works as a transporter—he is shrunk down small enough to fit in his father's pocket.