Near the end of Chapter 25 in The Catcher in the Rye, Holden says,
My hunting hat really gave me quite a lot of protection, in a way, but I got soaked anyway.
Throughout the novel, Holden has used the red hunting hat as a means of comfort and protection. He first bought the hat when the fencing team "ostracized" him for leaving the equipment on the train, which symbolizes Holden's need to put up a protective barrier between himself and those whom he thinks harm him. The hat is red, which is a direct tie to his brother Allie, who had red hair. Holden looked up to his brother because Allie embodied all the traits that Holden saw missing in himself: Allie was smart, creative, and well-liked by others. During situations in the novel when Holden feels distressed, he puts on the hunting hat. However, at the end of the novel, he gives the hat to Phoebe as a symbolic means of protecting her, but Phoebe doesn't need the hat and "chucks" it back at Holden. So when Holden puts on the hat in this scene in Chapter 25, the rain soaks through, which represents the fact that Holden now realizes that sometimes life comes with obstacles that he get through on his own without having to put up barriers of resistance.