The series follows the adventures of the crew of the Federation starship Enterprise commanded by Captain Jean-Luc Picard. In this episode, First Officer Riker leads the Enterprise in dealing with a strange new alien race called the Pakleds while Captain Picard undergoes artificial heart replacement surgery at a starbase.
Captain Jean-Luc Picard is due for a medical operation: his artificial heart is starting to break down and needs to be replaced. Picard refuses to have Chief Medical Officer Doctor Pulaski do it, and does not want the procedure performed on board the Enterprise as he is concerned about his image with the crew, so Pulaski implores him to go to a starbase for the operation. As Acting Ensign Wesley Crusher is already scheduled to travel there by shuttlecraft for his Starfleet Academy entrance exams, Picard announces he will be joining him. Though initially rebuffing Wesley's attempts to make conversation, Picard eventually softens, and reveals a bit of his past, including the experience that led to his acquiring an artificial heart in the first place.
Meanwhile, the Enterprise encounters the Mondor, a ship of strange aliens called Pakleds, who request the Enterprise 's help to fix their broken ship. Based on the Pakleds' rudimentary communication skills and apparent lack of understanding of the basic operations of their ship, Commander Riker judges them to be inept and harmless, and agrees to send Chief Engineer Geordi La Forge over to assist them.
On board the Pakled ship, La Forge quickly repairs the ship's navigational system, when suddenly main power fails, extending his stay; meanwhile, Counselor Troi senses troubling emotions from the Pakleds and warns Riker that Geordi is in danger, but Riker dismisses her concerns. Upon finally completing the repairs, La Forge prepares to return to the Enterprise, but the Pakleds use his phaser to incapacitate him, and raise shields. Lieutenant Commander Data determines that the Pakleds have acquired advanced technology from other races, and the ship's malfunctions were a ruse. Riker demands they return La Forge, but the Pakleds refuse, and stun him again.
On the Enterprise, Riker and Lieutenant Worf establish a ruse of their own, which they communicate to La Forge in code. Meanwhile, complications arise during Picard's transplant, and the doctors realize that unless they can locate an expert with the necessary expertise, he will die. As Riker sets up his ruse, Worf receives a message from the starbase that Picard is close to death. The Pakleds, meanwhile, intend to attack the Enterprise. La Forge convinces the Pakleds to delay firing until a specific range, at which point the Enterprise generates a spectacular but harmless pyrotechnic display, and Geordi simultaneously disables their weapon systems. The Pakleds, convinced they have been defeated, back down and return La Forge, and the Enterprise races to the starbase.
Picard is dismayed upon waking up to find that Pulaski has completed his procedure. While Pulaski assures him she will keep his secret, he returns to the Enterprise 's bridge to applause, which he quickly silences.