Unbeknownst to the crew, Data has become pen pals with a little girl named Sarjenka who lives on Drema IV, one of the planets under investigation. When Data tells Picard of his communications with Sarjenka, he learns that her planet is in danger of imminent self-destruction as a result of growing stresses beneath its surface.
Meanwhile, to help further Wesley Crusher's education as a Starfleet Ensign, Riker puts him in charge of the mineral surveys which will determine what's causing the quakes and volcanic eruptions on Drema IV. Against his better judgment, Wesley allows the older crew members under his command to talk him out of ordering a detailed and time-consuming analysis. Later, a discussion with Riker gives Wesley the confidence to order the tests, which soon reveal the cause of the geological disturbances.
Shortly thereafter, Picard agrees to enlist the U.S.S. Enterprise's resources to help save the inhabitants of Drema IV. When Data loses contact with Sarjenka, he beams down to the planet to guide her to a place where she can wait safely until the U.S.S. Enterprise launches probes which will save her homeland.
But soon, realizing that Sarjenka's planet will tear itself apart more quickly than anticipated, Data has the girl beamed aboard the U.S.S. Enterprise for safekeeping. After Sarjenka witnesses the launching of torpedoes which will prevent a geological disaster, she is beamed back to her now safe home.