Quentin and Margo have lived next door to each other for most of their lives. Quentin has had experiences with Margo that he believes bind them together, from riding bikes together as kids to finding a dead man's corpse. But he and Margo have not been in the same social circle for a long time. Quentin only knows Margo by proxy—he knows about her adventures, the rumors that circulate about her in school, and the person he thinks she is.
Quentin is in love with his idea of who Margo is even though he knows very little about her. He believes that Margo is an adventurous, fun, enlightened, slightly troubled girl who's perfect for him.
At the end of the novel, Quentin discovers that Margo is not who he thinks she is. Margo is a troubled girl with very little sense of identity who is trying to find her own purpose. She has an image of herself that she cultivates for other people, but no one knows who she truly is. She's just a girl trying to find herself, rather than some great miracle who will make Quentin's life interesting and exciting.
Quentin has to reconcile his image of who Margo is with the actual person. He has to learn that people aren't miracles, they're simply people with their own complexities, flaws, and complications.