The main theme of Sophie’s World is that the key to surviving the world is understanding yourself.
As Sophie learns more and more about philosophy from the mysterious Alberto Knox, she has to evade the clutches of the creepy Albert Knag. Alberto tells Sophie that the only way to stay out of Albert’s power is to learn as much as she can about philosophy. In fact, philosophy is the secret to life.
One of Albert’s metaphors is a top hat.
A lot of people experience the world with the same incredulity as when a magician suddenly pulls a rabbit out of a hat which has just been shown to them to be empty. (ch 2, p. 14)
We know that the rabbit is a trick, but the rabbit does not know it is part of a trick. In order to understand life you have to learn all there is to know about philosophy.
Note: There are chapter by chapter study guides. I have included a link to the first one.