The episode begins in a castle in Cortona, Italy, in 1418. We see Carlo, a young Italian man, looking at Moloch, a lizard-looking demon, his master. Moloch promises Carlo everything if he gives Moloch his love, and as Carlo promises his love, Moloch kills him. In a church, a few priests form the sacred circle of Kayless trap Moloch in a book. The book is sealed in a box, with the head priest expressing his hope that the book will not be read, or the demon Moloch will once again walk the world. The scene cuts to Buffy opening the box in which the book is kept, and is told by Giles to put it in a pile. Ms. Calendar and Giles trade jibes about the need for modern technology. As the class leaves, Willow tries to convince Xander to help her scan. As he leaves, she scans in the book Moloch is trapped in. As Willow leaves, the text "Where am I?" is displayed on the computer screen.
A week later, at school, Buffy questions Willow about her missing a few classes. Willow confides she has an online relationship with a boy named Malcolm. As Buffy tries to warn Willow about the dangers of rushing into a relationship with someone she has not seen, Fritz (a computer geek) is instructed by Moloch, via the computer he is working on, to keep watch on Buffy. Ms. Calendar questions Fritz about the unusual amount of time he and Dave are spending on the computer, and receives an ambiguous answer. Later, when Xander asks Willow if she will accompany him to the Bronze, she passes, wanting to talk to Malcolm. Buffy accuses Xander of jealousy, and Xander denies vehemently, claiming he is just worried about Willow, because they have no idea if Malcolm is who he says he is. The scene cuts to Fritz mumbling "I'm jacked in" as he scars himself in the form of the letter "M". As Willow is late on the next day, Buffy finds that she blew off classes to talk to "Malcolm". When Buffy asks Dave for help in finding out Malcolm's real identity, his angry response causes her to think that he is Malcolm. When Buffy asks Giles for help, he confesses he cannot help her much as he finds technology to be intimidating. His only idea is for Buffy to follow Dave. As Buffy follows him to the CRD building, a security camera points at her, and a message appears on a computer screen Fritz is looking at: "kill her".
When Buffy goes back to Giles and Xander, Xander unexpectedly knows that CRD is "Calax Research and Development", a hi-tech company which shut down. When Xander assures Buffy that it is suspicious since he would know if CRD re-opened, they decide to break in. When Ms. Calendar interrupts them, Xander and Buffy leave. Willow becomes suspicious of Malcolm after she learns that he knows Buffy was kicked out of her old school, and logs off the conversation. Back at the library, Giles's and Ms. Calendar's verbal sparring leads them to discover that Moloch's book is empty.
Outside of school, Dave tells Buffy that Willow wants to talk to her in the girl's locker room, as a plot to electrocute Buffy. Dave changes his mind at the last minute, and his warning combined with Buffy's slayer reflexes save her. When Moloch hears of it, he begins writing Dave's suicide note on the computer, and Fritz kills Dave. Buffy, Xander and Giles reconvene in the library, where Giles gives the exposition on how books were used to imprison demons, but if the books were read, the demons were set free. Together, they realize that Moloch has gotten into the internet - the scanning of his book being close enough to "reading" it to set him free - and is wreaking havoc from there. When Buffy tries to delete the "Moloch" file, his face appears and tells her to stay away from Willow, and Buffy realizes Malcolm is Moloch.
Buffy and Giles explain that there is no limit to the amount of damage a demon in the internet can do. After they find Dave's body, Xander and Buffy go to Willow's house, and Buffy tells Giles to ask Ms. Calendar for help, hoping that between his knowledge of demons and her knowledge of computers, they can reimprison Moloch. Willow is kidnapped by Fritz. At the library, Giles is surprised that Ms. Calendar understands demons, as she is a "techno-pagan". Buffy and Xander, guessing that Moloch had Willow kidnapped, rush off to CRD. Buffy calls Giles, and they coordinate plans. Inside CRD, Moloch's robotic body is prepared, and he is happy to see Willow. Moloch kills Fritz as a demonstration of his power. Buffy and Xander break into CRD as Giles and Ms. Calendar start preparing the binding spell. The binding spell does not complete, but casts Moloch out of the internet and traps him inside his robotic body. Moloch crashes through a wall and backhands Xander, but Willow hits Moloch with a fire extinguishier. As Moloch tries to kill Buffy, he punches an electrical power line and dies.
The next day, Buffy, Willow and Xander joke about how the Hellmouth is screwing with their love lives, laughing about how none of them will ever find true happiness, then looking decidedly unenthused at the thought.