"The Doomsday Machine"
The Enterprise discovers a weapon capable of destroying entire planets, and a commodore whose crew was killed by the machine jeopardizes the crew on a crazed mission of revenge.
"Bones, did you ever hear of the doomsday machine?" - Kirk
"No. I'm a doctor, not a mechanic." - McCoy

A doomsday machine was, according to James T. Kirk, "a weapon built primarily as a bluff. It's never meant to be used. So strong, it could destroy both sides in a war." At the time of the discovery of an extragalactic planet killer in 2267, Kirk theorized that the robot weapon was, in fact, that. "A doomsday machine that somebody used in a war uncounted years ago. They don't exist anymore, but the machine is still destroying." It is a giant machine miles long that uses beams of antiprotons to tear apart planets and consume the debris, fueling its progress through the galaxy.
"Captain, you're getting dangerously close to the planet killer." - Spock
"I intend to get a lot closer. I'm going to ram her right down that thing's throat!" - Kirk (Using The Constellation To Destroy The Machine)