Milo is a young man who experiences the majority of his days in a condition of shocking fatigue. This standard changes when Milo travels through the baffling pretend tollbooth that shows up in his room one day. Milo does not trust that anything he learns—numbers, words, or whatever else—is pertinent to regular day to day existence.
Here, Hamlet is using a metaphor. Metaphors compare two things, yet differ from similes in that they don't use "like" or "as." He is comparing Denmark to a prison, meaning that he feels that the city is confining and bleak.
You could use the library or the internet when you're considering a topic to write about so you know all you need to when you are writing it. hope this helps!