Sachar writes the humorous plot of Holes in a straightforward manner; however, he weaves into the plot three subplots. The subplots are tall-tale motifs that provide explanations about incidents involving previous Yelnats generations that significantly impact Stanley's life as well as the lives of others.
Stanley Yelnats (whose name is palindromic — which means that his last name is his first name spelled backward) is the protagonist (or main character) of the novel. An only child, Stanley lives with his mother and his father, who is an inventor. Stanley is a good-natured, kind, middle-school student who is ridiculed by classmates because he is overweight. Stanley's life changes dramatically after Derrick Dunne, a classmate who is much smaller than Stanley and is fond of picking on Stanley, takes Stanley's notebook and throws it in the toilet in the boys' restroom at school. Stanley misses his bus and has to walk home. While walking home, a pair of old sneakers "fell out of the sky" and hit him on the head. Excited because he thinks the sneakers will assist his father, who is trying to invent a use for old sneakers, Stanley runs toward home. The police stop Stanley and he is mistakenly arrested for stealing the sneakers.
Unfortunately, only Stanley's parents believe he is innocent. During the trial, Stanley discovers that the sneakers belonged to Clyde "Sweet Feet" Livingston, a famous professional baseball player who had donated his sneakers for an auction to help raise money for a homeless shelter for children. Stanley is unfairly sentenced by the judge and has a choice of going to jail or to Camp Green Lake. Because he is from a poor family and has never been to camp, he chooses Camp Green Lake.
Stanley believes that he has been unjustly accused of stealing the sneakers because of his "no-good-dirty-rotten-pig-stealing-great-great-grandfather." When Stanley's great-great-grandfather, Elya Yelnats (who never really stole a pig) was 15 years old and living in Latvia, he fell in love with a girl named Myra Menke and wanted to marry her. A pig farmer named Igor also wanted to marry Myra and offered Myra's father a pig for her hand in marriage. Because Elya had nothing to offer for Myra's hand in marriage, he went to visit an Egyptian woman named Madame Zeroni, who couldn't walk. She gave Elya a piglet and specific instructions to follow. If Elya didn't follow the instructions, Madame Zeroni would put a curse on him and all of his descendents. Elya had to take the piglet up the mountain to drink from a stream, and, while the piglet was drinking, he was to sing a lullaby. On the last day, he was to carry Madame Zeroni up the mountain, let her drink from the stream, and sing the lullaby to her. Elya did not take the pig up the mountain the last day, nor did he carry Madame Zeroni up the mountain. Instead, he left Latvia on a ship for the United States of America and from that day on, experienced bad luck as a result of Madame Zeroni's curse. From then on, the Yelnats family believed they were cursed with bad luck. Stanley was not really surprised when he was arrested; he believed it was just more bad luck.
Camp Green Lake is a juvenile correctional camp for boys. It is situated in the middle of a desert — there is no lake — and it is inhabited by yellow-spotted lizards. When he arrives at the camp, Stanley meets Mr. Sir, the guard, and is told that his punishment, which is the same for all the boys, is to dig a hole each day that is five feet deep and five feet in circumference. Mr. Sir tells him that digging the holes will build character and that he is not at a Girl Scout Camp. Mr. Sir also tells Stanley to give any objects that he finds while digging to Mr. Sir and, if the Warden (Ms. Walker) thinks it is worth anything, Stanley will get the day off.
Stanley is assigned to Group D and given a cot to sleep on in a tent with the other boys in his group. He is issued two orange uniforms. His counselor is Mr. Pendanski (nicknamed "Mom"). The other boys in his tent are X-Ray (Rex), Squid (Alan), Magnet (José), Armpit (Theodore), Zigzag (Ricky), and Zero. Each day, the boys arise at 4:30
A.M. and are given a shovel with which to dig a hole. Stanley learns quickly that X-Ray is the unofficial group leader and that cooperating with X-Ray is essential to his survival. Stanley is nicknamed "Caveman" by the other boys and is accepted by them after he finds a gold tube with the inscription "KB," which he gives to X-Ray so that X-Ray can get a day off. After finding the gold tube, the digging escalates, at the Warden's command. Stanley realizes that they are not digging to build character; they are digging to find something buried in the dried up lakebed. Because the Warden believes that the gold tube was found in X-Ray's hole, she instructs the boys to dig in that area and not near Stanley's hole, where the gold tube was really found. Stanley realizes that the inscription on the gold tube could stand for "Kate Barlow."
Kissin' Kate Barlow was a feared outlaw of the Wild West. Stanley's great-grandfather, who had been riding a stagecoach from New York to California, was robbed by Kissin' Kate Barlow and was stranded in the desert for three weeks. He survived, claiming to have "found refuge on God's thumb."
Kissin' Kate Barlow was the former Katherine Barlow, a school teacher known for her delicious jarred peaches. Legend has it that Katherine Barlow, a white woman, fell in love with Sam the Onion Man, a black man. Interracial relationships were illegal in the Green Lake community. The town's citizens set out to lynch Sam because he had broken the law and kissed a white woman. Sam's donkey, Mary Lou, was killed, and as Sam and Mary Lou tried to get away, Sam was also killed. From that time on, Katherine Barlow was known as Kissin' Kate Barlow. Eventually, Trout Walker (who had wanted to marry Katherine when she was a schoolteacher) and his wife (whose appearance closely resembles that of the Warden) find Kissin' Kate and intend to torture her unless or until she tells them where her treasure is located. Kissin' Kate is killed by a yellow-spotted lizard and indicates that the treasure is buried in the dried-up lake bed.
Because Stanley doesn't want his parents to know how miserable his situation is, he writes letters to them telling them about the activities he participates in at the "recreational" camp. Zero watches him write and reveals to Stanley that he cannot read or write. They agree that Stanley will teach Zero to read and Zero will dig half of Stanley's hole each day in return.
Jealous of Stanley resting while Zero digs half of his hole, Zigzag instigates a fight with Stanley. The Warden forbids any reading lessons and tells Stanley he has to dig his own hole. Zero is angry. He refuses to dig another hole and runs away.
A few days later, after a botched attempt to steal the water truck, Stanley runs away to rescue Zero. Stanley finds Zero under an old boat with the name "Mary Lou" on the side, eating jarred peaches that he calls "sploosh." The boys leave the shade of the boat to climb the mountain they see in the distance, the mountain that resembles a fist and a raised thumb. Because Zero is quite sick, Stanley carries him up the mountain. At the top of the mountain, Stanley sings the lullaby that has been in his family for years. The boys survive on water and wild onions. Zero tells Stanley his name is Hector Zeroni and that he is the one who stole Clyde Livingston's sneakers.
Feeling better, Stanley and Hector go back to Camp Green Lake. While everyone is sleeping, they dig in the hole where Stanley found the gold tube. There they unearth a suitcase. As they pull the suitcase out of the dirt, the Warden, Mr. Sir, and Mr. Pendanski are waiting for them. Stanley's lawyer and the Texas Attorney General show up. Stan-ley's crime has been investigated further by a patent attorney hired by Stanley's father. Derrick Dunne admitted that Stanley was getting his notebook out of the toilet at school at the very time that Clyde Liv-ingston's sneakers were stolen. Stanley is innocent and can go home. The Warden tries to take the suitcase from Stanley and Zero, but the suitcase bears the name "Stanley Yelnats" on it, so Stanley can keep it. Because Zero's files cannot be found (they had been destroyed at the Warden's instructions, so that she would not have to explain why he was missing), Zero leaves with Stanley.
In the novel's last chapter, Sachar ties up the loose ends of the plot and the subplots. Stanley's father finds a cure for foot odor that smells like peaches and is called "Sploosh." Clyde Livingston does a commercial for "Sploosh." Hector (a descendant of Madame Zeroni) is at Stanley's house with his mother. The Warden, Ms. Walker (a descendant of Trout Walker), is forced to sell her land, which is going to become a camp for Girl Scouts. In the end, the story's tone is one of contentment. Stanley has rescued Zero, and the Yelnats family is finally free of Madame Zeroni's curse.