The episode opens with William Riker visiting Risa and being introduced to a video game by Etana Jol, a Ktarian woman with whom he has become romantically involved during his vacation on the pleasure planet. Riker, upon his return to the Enterprise, distributes replicated copies of the game to the crew of the starship.
Cadet Wesley Crusher, on vacation from Starfleet Academy, is visiting the Enterprise and notices everyone playing the game (and trying to convince him to play as well). Doctor Beverly Crusher, Wesley's mother, secretly switches off Lieutenant Commander Data and sabotages his circuits, because he would be immune to the game's addictive properties - it addicts people who play it by stimulating the pleasure centers of their brains when they successfully complete each level.
Wesley reports to Captain Jean-Luc Picard his suspicions that the game is dangerous. However, Picard is shown (to the audience) afterwards to already be addicted. Eventually, Wesley and his new girlfriend, Robin Lefler (played by Ashley Judd), are the only people on the ship who have yet to become addicted to the game. Although they briefly manage to evade detection by pretending to play nonfunctional mock-ups, they are eventually forced by the crew to submit themselves to the genuine article.
At the conclusion of the episode, Data (having been examined and repaired by Wesley and Ensign Lefler before they were forced to submit to the game) frees the rest of the crew from their mind-controlled state by flashing pulses of light in their faces from a handheld lamp. The crew is then able to discern the purpose of the game: It rendered them extremely susceptible to the power of suggestion, compelling them to aid the games' creators - the Ktarians - in an attempt to take control of the Enterprise (and eventually the Federation). Picard captures the Ktarian vessel responsible for distributing the games and has it towed to the nearest spacedock, putting an end to this particular alien threat. Wesley and Lefler bid each other a reluctant farewell as he returns to Starfleet Academy.