Holden is wearing a hunting cap made of a cloth material. The hat covers his ears and keeps him warm, but cannot keep him dry. The rain soaks through his clothes and there is nothing the hat can do to stop it.

The hat is not meant to protect a person from rain, only from cold. If Holden had an umbrella along with the hat, he would be both dry and warm.

Clearly, this reading is a literal and purely functional one. We can also look at this quote symbolically.

Holden's red hat is an abiding symbol throughout the book of his self-conscious isolation from other people.

The hat, for Holden, has a special meaning. It is both odd and unique, like Holden and like his sister Phoebe. The hat is not fashionable. In fact, it is decidedly the opposite of fashionable, yet Holden really likes it.

This relationship with the hat parallels Holden's relationship to his opinions, which set him apart from most of the people he encounters. His opinions are both odd and unique. They are meant to protect him from becoming the kind of person he does not want to be. They are meant, it would seem, to protect him from growing up.

As his hat can only protect Holden from the cold and not from the rain, his opinions fail to protect him from changing (e.g., growing up or becoming a phoney), naturally, though these opinions do provide Holden with some comfort. Playing out as he carries on extended conversations with himself and his dead brother, Holden's virulent opinions clearly function as an attempt to separate him from other people and to ward off the impending future.