I think a person first has to ask if he likes and gets along with people in other settings; because there are people who have trouble getting along with, and liking others, who are in need of psychiatric help. If the person has trouble everywhere where there are other people, then he should look into getting some kind of help.
On the other hand, if it's one setting where the person just doesn't happen to fit in well with "everyone else", he needs to ask if leaving is an option; and if he's miserable enough to even consider leaving. Sometimes, it's uncomfortable to be among people we don't like (and who don't like us), but not unbearable if we just mind our business and get through the day. Whether it's work or school, people often just do their thing and enjoy their own social life and friends in their personal life.
If it's really unbearable and people are giving the person too hard a time - then leaving seems to be the only option (well, that, or developing a thicker skin).