The film opens with the protagonist, Ponyboy Curtis, beginning to write the story of the film in a composition book for school, thus establishing that the narrative will be from his perspective. His story begins with him and his other young friend spending the evening with an older member of their Greaser gang, Dallas. Dallas has recently been released from jail and is looking for a good time. Their evening adventures leads them to the drive-in movie, where they meet Cherry Valance and her friend Marcia, two girls who are members of the rival Soc gang. After Dallas offends Cherry with his crass and disrespectful behavior, Cherry strikes up a friendship with the more sweet-natured Ponyboy. After the movie, Two-Bit (another Greaser), Johnny, and Ponyboy walk home with Cherry and Marcia, but they are discovered by Marcia and Cherry's Soc boyfriends, the heavy-drinking Bob and his friend Randy. Livid that his girlfriend is hanging out with Greasers, Bob begins to challenge the Greasers to a fight, but Cherry agrees to go with them and the tension is relieved.
The Greasers go home. Johnny expresses grief about his abusive and unstable household, before Ponyboy says his goodnights. Upon arriving home at 2 AM, Ponyboy is met with anger by his strict oldest brother Darry, whose anger escalates into abuse. After Darry hits him, Ponyboy runs from the house, finds Johnny still asleep in a nearby park, and the two boys go for a walk. At a playground, they run into Bob and Randy, who are looking for a fight. The Socs descend on Ponyboy, and Bob pushes his head into a fountain, attempting to drown him. Recognizing Bob as the Soc who slashed his face with his rings a few nights before, Johnny pulls out a knife and saves Ponyboy from drowning by stabbing Bob.
When Ponyboy awakens, he sees the violent scene nearby, and he and Johnny run to find Dallas for advice. Dallas tells them to take a freight train to a nearby town and hide out in an abandoned church until he figures out what they should do next. They follow his instructions and set up camp at the church, cutting and dying their hair, reading Gone with the Wind aloud, and watching the sunrise. Dallas eventually comes and finds them to bring them back, giving Ponyboy a note from his older brother Sodapop. Johnny says he wants to turn himself in, in order to get off easier, which upsets Dallas, who doesn't want to see his young friend go to jail. After going out for lunch, the trio returns to the abandoned church only to find it on fire. A school group was looking at the church, and we learn that several children are still trapped in the church. Against the urging of the teachers and Dallas, Johnny and Ponyboy go into the burning church to save the children. Eventually Dallas joins them, and Ponyboy manages to get a few children out and safely escape the church. Johnny is not so lucky, enduring major burns.
Back in town, Johnny is in the hospital in bad condition, Ponyboy is reunited with his older brothers, who welcome him back with open arms, and the trio—Dallas, Johnny and Ponyboy—are celebrated as local heroes. Meanwhile there is a rumble planned between the Socs and the Greasers. Ponyboy manages to get his older brother Darry to allow him to participate, since there will be no weapons used. The Greasers arrive at the lot where the rumble will be. The two gangs fight hard in the pouring rain, and the Greasers eventually win. After the rumble, Dallas and Ponyboy go to visit Johnny and tell him about the fight, but he tells them that fighting won't solve anything, before dying in his hospital bed. Dallas becomes angry about the tragic, unfair death of the young Johnny, and runs away. He holds up a convenience store clerk with an unloaded gun, and then the police pursue him, believing him to be a dangerous criminal. As the rest of the Greasers arrive at the location where the police have apprehended Dallas, they yell that he is holding an unloaded gun and is not a threat, but the police gun him down anyway.
Ponyboy reads a letter from Johnny in the wake of the violence surrounding him, urging him that there is still a lot of good in the world, and that Ponyboy needs to keep encouraging people to look at the sunset, and "stay gold."