David (Tobey Maguire) and Jennifer (Reese Witherspoon) are twins and attend the same high school. Jennifer is concerned mainly with her appearance, relationships and popularity, while David watches a lot of television, has few friends, and is socially awkward. Their mother (Jane Kaczmarek) leaves Jennifer and David alone at home while she heads out of town for a rendezvous with her younger boyfriend. The twins begin to fight over the use of the downstairs TV; Jennifer wants to watch an MTV concert with her date, Mark Davis, while David hopes to watch a marathon of his favorite show, Pleasantville.
Pleasantville is a black-and-white '50s sitcom, a cross between Leave It to Beaver and Father Knows Best that centers around the idyllic Parker family George (William H. Macy), his wife Betty (Joan Allen), and their two children, Bud and Mary Sue. David is an expert on every episode and wants to watch the marathon so he can win a $1,000 trivia contest. During the fight between David and Jennifer, the remote control breaks and the TV cannot be turned on manually. A mysterious TV repairman (Don Knotts) shows up uninvited, and quizzes David on Pleasantville before giving him a strange-looking, retro-styled remote control. The repairman leaves, and David and Jennifer promptly resume fighting. However, through some mechanism of the remote control, they are transported into the television, ending up in the Parkers' black and white Pleasantville living room. David tries to reason with the repairman (who communicates with him through the Parkers' TV set) but succeeds only in chasing him away. David and Jennifer must now pretend they are, respectively, Bud and Mary Sue Parker.
Jennifer is dismayed to be stranded, but she and David begin exposing the town to issues such as sex, personal freedoms, styles of art, and literature. Pleasantville soon begins changing at a rapid pace, and previously black and white objects and people begin to develop full and vibrant colors. After initially wanting to leave, David discovers a sense of belonging he lacked in the real world, so when the TV repairman returns and berates him for altering the show so much, David turns off the TV, relinquishing his ability to go home in the process. While the mayor is concerned, people in Pleasantville begin to explore hidden abilities and revel in their new freedoms.
The town fathers, who see the changes as eating away at the town's moral values, remain unchanged. Certain youths, such as Skip and Whitey and their friends, also remain unaffected. They resolve to do something about their increasingly distant wives and disaffected youths. Behavior similar to Nazism, as well as racial segregation and subsequent rioting similar to that of the African-American Civil Rights Movement start to occur, incited by a nude painting of Betty on the window of Bud's boss Bill Johnsons soda shop; the window is smashed with a park bench, and the soda shop is destroyed, books are burned, and anyone who is "colored" is harassed in the streets. Bud begins to grow into a strong leader, advocating resistance to the new "Pleasantville Code of Conduct", a list of regulations preventing people from visiting the library and Lovers' Lane, playing loud music, or using colorful paints. Bud/David and Bill are arrested and tried in court for violating the paint rules, but ultimately everyone in the court room changes colors and Mayor Bob leaves in horror when he is exposed as having changed as well.
Eventually, the entire town becomes colored, and the people of Pleasantville are finally introduced to the rest of the world. Televisions at the television repair shop now display full-colored images of various scenic vistas around the world, and Main Street, which had previously been a circuit that led back to its beginning again, now leads away to other towns and cities.
Jennifer chooses to stay behind in neighboring Springfield, while says goodbye to Betty and his new girlfriend David returns home using the remote control after promising to return and check up on her soon. He finds his mother crying in the kitchen, distraught over her life and her failed relationship. She complains to him that her life was not supposed to run this undesirable course. David replies, "It's not 'supposed' to be 'anything'."
Back in Pleasantville, the citizens and Jennifer are enjoying their new freedoms and colors. Betty is seen sitting next to George on a park bench. George asks what will happen next and Betty admits incredulously that she doesn't know. When she asks George, he laughs upon realizing that he doesn't know either. The camera focuses on Betty for a second as she relaxes against the bench, then she turns once more toward the other side of the bench. The camera pans to the side to reveal Bill Johnson sitting where George had been. He says "I guess I don't know either," and smiles.