In what must be one of the funniest episodes of the series (and a great indicator of the series' intentional comedic possibilities -- brought to fruition in Star Trek IV: The Voyage Home), the Enterprise crew visits a planet that has taken a historical text on 1920s Chicago gangs as its bible. As the residents of the planet are remarkably imitative in nature, the planet's residents have divided themselves into a series of criminal gangs, two of which are headed by Bela Oxmyx (Anthony Caruso) and Jojo Kracko (Vic Tayback), and Kirk and Spock find themselves in the middle.
What makes this otherwise frivolous episode work is the fun Shatner and Nimoy have with the historical disconnect -- most notably in Kirk's efforts to drive a car (and Spock's reactions thereto) and his subsequent efforts to pick up the lingo of the planet. Needless to say, Shatner plays this for all it's worth, and Nimoy's gift for understatement complements it beautifully.
Truly a joy to watch -- just don't spend too much time analyzing it.