The novel, set in 1983, revolves around a game programmer and his family. His claim to fame is a fictional Atari computer game called Hacker Snack . Step Fletcher, a devout Mormon, moves his pregnant wife DeAnne and their three children (Stevie , Robbie  and Elizabeth ) from Indiana to Steuben, North Carolina so he can start a new job as a technical writer. Fletcher must deal with several unpleasant situations. His manager, Dicky Northranger, is a greedy, petty and manipulative man who does everything he can to undermine Step's position, while the owner of the company, Ray Keene, asks him to cross-check whatever technical job Dicky does as it seems he is not very comfortable about Dicky's competence.
Glass is a young programmer at work who is very friendly towards Step and always offering to babysit his kids. Later on, Step comes to realize that Glass is a child molester who loves washing little girls' privates. This nauseates Step, and he vows that Glass shall never get near his children.
The Fletchers' new house is periodically invaded by hordes of different types of insects. Bappy, the elderly father of the owner of the rented house, is always ready to lend a hand with things as he has lots of 'time' nowadays.
Meanwhile, Stevie's teacher at his new school hates him and Stevie becomes withdrawn. Step confronts the teacher and she leaves, but Stevie becomes even more withdrawn, playing only with his imaginary friends in the garden and on his computer. As Stevie's group of imaginary friends, who are all boys, grows, his parents become increasingly concerned and eventually take him to a psychiatrist, against their better judgment. Then they see a newspaper article about young boys who are disappearing. The names of Stevie's imaginary friends are exactly the same as the missing children; Stevie also knows the boys' nicknames. They notify the police, who come over to the house and question Stevie briefly, but they leave with little to go on other than the confirmation that the boys are indeed dead, as opposed to simply missing. Step, who is a video games expert, notices that the video game that Stevie uses to play with his imaginary friends has graphics that are way beyond anything that could actually run on the computer but fails to investigate further.
At a company outing, Glass manages to get Elizabeth on her own and Step, who has suspected Glass of being a child molester for some time, yet has not told his wife, manages to rescue his daughter just in time.
He confronts Glass directly and feels that he has acquired another enemy in Steuben.
The Fletchers receive a packet containing a record by the band The Police with the song "Every Breath You Take". The song is about a stalker with the lyrics "Every breath you take/Every move you make/Every bond you break/Every step you take/I'll be watching you". Step later learns that this was a prank of Stevie's embittered teacher who had to leave her job after Step's confrontation.
As the mystery about Stevie's friends increases, Step one day discovers that the game with very advanced graphics that Stevie plays on the computer with his friends, does not run in front of anyone else but Stevie.
The pest infestation continues in their house, and Step and De Anne are convinced that the soul of their son is so pure that he is surely able to gauge the disturbance in the fabric of the cosmos due to something bad happening in and around this house or this town.
On the 22nd of December Bappy arrives and fits the Christmas lights for them and lingers for quite sometime. DeAnne notices that Stevie has eaten very little recently. Finally on Christmas Eve Stevie brings in his friends to introduce them to his parents and to celebrate Christmas.
Step and DeAnne are happy that they have finally seen Stevie's friends. When Stevie is asked why he didn't bring in his friends earlier, he confesses that he himself was surprised that others were not able to see them. Then, he says that now that he is finally like them, he has shown them the way to make others see them. Everyone is confused with what he says. He then explains that the disappearance of the little boys at Steuben has to do with Bappy, and that he had confronted him directly on the day he had been fixing lights. Bappy was too fast for him and had murdered him before he could come running in. He said that the underspace below the house had eight graves among which his was the last. He also says that he had done what his parents had taught him, which was to do what he felt was right. He had felt that he was the one whose job it was to stop Bappy from doing this thing to other boys.
His soul was strong enough to bring him to everyone's notice even after death and now he felt ready to go. At the end he was alone with his parents like so many years back when their family had just started. He says that he will miss his parents very much and Step and DeAnne bid him farewell with a proud heart and moist eyes.
Bappy is arrested and charged with the murder of the boys. Years later, Robbie and Betsy regard their elder brother like a legend and the family wait to unite with their lost child once again on the 'Other Side'.