Isolation works on two levels in Chamber of Secrets: first, there is the isolation of the wizarding world. Because wizards spend so much time avoiding Muggles, many of them have developed strongly negative emotions about non-magical people. That's where the anti-Muggle-born prejudice of people like Lucius Malfoy comes in. Still, there is also the isolation of Harry's home at Hogwarts. J.K. Rowling has discussed the emotional good sides of boarding schools:
"There is something liberating, too, about being transported into the kind of surrogate family which boarding school represents, where the relationships are less intense and the boundaries more clearly defined." (source)
Yet, while isolation may bring a sense of family, it also has a downside: claustrophobia. In a small, closed social setting, there is nowhere to go when public opinion turns against you. Rumors fly quickly. Harry's isolation from the Muggle world at Hogwarts in Book 1 seems like a blessing when all he wants to do is escape the Dursleys. By Book 2, though, some of the more negative sides of his small community and fame leave him feeling lonely and resentful.