Holden vacillates between wanting relationships and rejecting them, in a fashion perhaps that is a caricature of typical adolescent behavior. Holden does talk several times about being "alone" in the novel, and not liking it, but then he does things which specifically create loneliness for himself. Holden has the desire to denigrate everything around him (calling people "phonies" for example), while at the same time wishing to be part of something and have relationships with other people.
One example would be the relationship (or encounter) that Holden attempts to have with the prostitute Sunny. Holden thought that perhaps he would have his first sexual experience with her, but that does not happen. He tries to talk to her about his feelings, and make a friendly connection with her, but she is not interested in talking to Holden. She ends up cheating him and her pimp demands double the fee that was originally agreed upon. Holden fails utterly to make any connection with Sunny.
Though Holden says a lot of bad things about Sally Hayes, he tries to make a connection of a romantic kind with her. Though they neck in the cab, the fact that she enjoys things that he doesn't (like the play they go to see, and the movies) alienates him from her. He asks her to run away with him, which of course she refuses. Again, Holden fails to make any kind of real connection with Sally, and succeeds only in making her angry and frightened.
Holden wants, and achieves, a close relationship with his sister Phoebe. It is plain from the novel that Phoebe has always been close to him, perhaps even more now after the death of their brother, Allie. Holden spends time in New York before seeing his sister, but he thinks about her often and eventually makes goes home specifically to see her. He reaches out to her and tells her how distressed he is by telling her that he is going to run away. Phoebe responds loyally and lovingly, if misguidedly. Phoebe and Holden's relationship is continuous and successful.
Holden does want some kind of relationship with his overbearing roommate Stradlater, but it does not end up how he wants it to be. Stradlater dates a girl who Holden knows, which angers Holden. Stradlater uses Holden to do his homework for him, and then criticizes the paper Holden writes for him. Stradlater ends up by beating Holden up. Any constructive relationship is lost between the two boys, mostly because of their own problems with each other and character failings.
Holden says he doesn't want to have a friendship with the annoying hallmate at Pencey Ackley. But Holden is very lonely, and tries to alleviate this loneliness by hanging out in Ackley's room even after Ackley is asleep. This is more a relationship desired out of desperation; Holden doesn't really like Ackley.
Holden wants a kind of mentor/fatherly type of relationship with Mr. Antolini, which succeeds for part of the evening. When Mr. Antolini touches Holden (stroking his hair), however, Holden is convinced (possibly correctly) that Mr. Antolini has homosexual desires for him. This creates such a problem for Holden that any further relationship with his ex-teacher is ruined.
Holden attempts to have relationships of the sexual, romantic, friendly, mentor, and familial kind, with varying success.
yes i mean i guess