Pip longs to belong to the upper class, mainly to impress Estella and Miss Havisham; going to Miss Havisham's house and encountering Estella's disdain gave him a sense of self-consciousness and shame about his humble circumstances. However, he finds that it is not as easy as one may think to gain their esteem and to belong with them. Even though he gains money, he never truly wins Estella's heart, and Miss Havisham still regards him as little Pip, who she toys with to please her notion of love and betrayal. Throughout the story Pip encounters a few key characters that help him to feel a sense of belonging. Herbert Pocket is one of them--though from a more well-to-do family, Herbert fully embraces Pip and makes him feel like he belongs. Also, Pip always feels loved by Joe and Biddy, even if his own sense of superiority keeps him from feeling like he belongs there. It isn't until he gets over his own pride that he can feel like he belongs with them again.
Other characters that make Pip feel like he belongs are Wemmick, and much to Pip's dismay, the infamous Magwitch. Wemmick accepts Pip into his curious little house and life, and is a steady friend to Pip. Magwitch, who comes on the scene later, loves and accepts Pip, even if Pip doesn't welcome it. Eventually, he accepts that love and does all he can to protect Magwitch.
The Pockets are an interesting study in class and belonging. The mother, coming from a super rich family, descended "below herself" in marrying Mr. Herbert Pocket Sr., and she spends her entire life being incompetent and moaning after days past. Her husband, although slightly well-to-do, is still not the super upper-class, and has to work for a living. Despite all of this, some of the more snobby Pockets, at Miss Havisham's, display ostracism and disdain for Pip in his reduced circumstances, that is, until he comes into money. In this book, Dickens does a good job of pointing out how a little bit of money or nobility can give people quite a false sense of pride and a real sense of snobbery and insincerity. He teaches the lesson that it isn't money or class that brings happiness, but acceptance of one's self, and true friends that help you to feel like you belong. I hope that those thoughts helped; good luck!