Holden Caulfield narrates his story from a mental institution somewhere in California near Hollywood. He is taking a much needed "rest" from his former life of boarding schools and expulsion.
The sequence of events that Holden narrates from his room at the mental institution reveal much about why Holden is there in the first place: he's depressed, has violent urges, contemplates suicide, and even has physical side effects from his depression like nausea and headaches. Salinger includes details, like Holden's mention of his psychoanalyst, to suggest that Holden's mental breakdown is genuine and not 'phony.'
In The Catcher in the Rye, Holden Caulfield (the book's narrator and protagonist) opens the novel by claiming:
I'll just tell you about this madman stuff that happened to me around last Christmas just before I got pretty run-down and had to come out here and take it easy.
The "out here" that Holden is referring to is a "rest home" in California. After the events of the book--Holden's escape to New York City after being expelled from Pencey Prep, his struggle with his sexuality and encounter with a prostitute, his failed love affair, his rolling moods and emotional instability, etc.--Holden only tells us that he went home and "got sick":
I grew six and a half inches last year. That's also how I practically got t.b. and came out here for all these goddamn checkups and stuff.
Holden is not exactly the most reliable narrator, and it is largely assumed that "rest home" is intended to be Holden's euphemism for a mental institution or a formal hospital where he is placed by his parents to recover. Although such terms are never explicitly stated in the novel, we do know that he receives frequent visits from "this one psychoanalyst guy," which suggests that he is receiving some sort of critical mental care. Either way we read it, Holden has undoubtedly had to withdraw from the world in order to stabilize and prepare for his next adventure: returning to school in the Fall.
Of course Holden has his breakdown in New York City. After several days wandering the streets of the city and showing greater signs of depression (loss of appetite, disappearing feeling, loss of sex drive, etc.), he has some kind of revelation in Central Park when he lets Phoebe reach for the brass ring on the carousel. He realizes that he can't be "the catcher in the rye" and preserve childhood innocence.
The rest happens "off stage" but the reader can assume that Holden's parents become aware of his situation and seek help for him. Holden is narrating the story from a rest home or mental institution in California. We know this because his brother visits him there. The story is often presumed to be his session with a psychiatrist.
Holden is in a "Rest home" as he tells his story. His location can be interpreted in many different ways because for all we know he could be at a psychologist. One student in my AP class mentioned a mental institution but my teacher disagreed and told us just because it was a closed space didnt mean he was in a mental institution.