The main idea of the story is pretty much synonymous with Holden Caulfield's motivation throughout the story. He goes to New York City and spends most of his time looking for something. What is it he is looking for? What does he want? He talks about all the people he meets, but he never explains why he is trying to meet them. I think Salinger himself felt this was a weakness in his novel. It is almost like a detective story without a culprit to identify or track down. Jay McInerney's Bright Lights, Big City has a similar plot, except that the hero has a specific goal--he is trying to find a certain girl he is in love with. Whenever Holden talks to someone he usually decides that person is a phony. Whatever he wants from people he is not gettiing. Evidently he is lonely--as who wouldn't be alone in such a big city? He seems to be looking for friendship and genuine communication. Nobody else is interested in friendship or honesty, with the exception of his little sister. He suffers from a feeling that is common, especially in a big city. It has been called "anomie"--which might be defined as not knowing anybody and being unknown to everybody. New York becomes for Holden a mirocosm of the whole world. He feels alone in the universe, a feeling associated with existentialism. If he were older he might learn to tolerate his isolation, but he is very young, naive, and vulnerable; he suffers a nervous breakdown. New York City is not the ideal place to go lookinig for friendship or sincerity. They used to have a saying, "You want a friend, buy a dog!"
The theme is the hopelessness and self isolation of mental illness, PTSD. Holden complains incessantly about being loney, and yet he self-sabotages all his relationships with people other than his little sister, whom he idealizes and idolizes.
He picks arguments and fights with his roommates. Whether outwardly or inwardly through internal dialogue, Holden denigrates and offends classmates and teachers and even a woman on the train, for whom he concocts an outrageous lie about her son, one of his classmates. He provokes arguments with a former teacher and an upperclassman and with a girl that he has a date with. He even succeeds in offending cab drivers. Desperate for company, he pays a prostitute and then sabotages that transaction, insulting her pimp by calling him a "moron," provoking him to punch him.
No one can help Holden in his downward spiral of mental crisis because the adults aren't qualified to recognize his condition, and the only person he levels with to ask for help is someone too young to understand or to do much good even if she did realize he has a mental condition, his little sister, which guarantees that he won't be helped until he collapses.