An alien being named Sargon—who exists as pure energy without a form—invites a small team to beam down to a planet that had been destroyed half a million years earlier. Sargon asks Kirk to volunteer his own and two of his crew members' bodies (Spock and Dr. Mulhall, played by Diana Muldaur), so Sargon, his wife, and an old enemy turned friend (or so we think) can create robot bodies and spread their awesome knowledge to the rest of the galaxy.
The episode does a great job of being intriguing until the final act degenerates into a mindless muddle. The plot, initially compelling and with rigid rules, throws all the rules out the window in an inane, arbitrary ending sequence that borders on incoherence. That's too bad, because the aliens' quest is an interesting, often poignant one—as they find their newfound human sensations almost too appealing to relinquish. The villain of the story inhabits Spock's body, giving Nimoy an interesting break from the norm.
There's also a speech in the episode that seems to epitomize Trek's sense of adventure, but it's so overplayed with dramatics and Shatner's scenery chewing that it comes off looking self-important and silly. It practically forms the model for every Shatner impression (particularly Kevin Pollack's) that has since been performed. I got a chuckle out of it, although I wasn't supposed to.