In the program McCoy accidentally injects himself with substance that makes him paranoid and is compelled to leave the ship for the planet they are near. Through a series of events he goes through a portal to old earth (depression era). Some how he changes history and the Enterprise disappears. So the mission is to retrieve McCoy before he changes time. This naturally includes a love interest (Joan Collins.) Read the book on Harlan Ellison's Manuscript first (ISBN: 1565049640). This is not a serialization of the program; it is the original written script. You will be surprised at the transformation from a Harlan Ellison novel to a Star Trek episode (28).
To fit the mold of the series McCoy replaced a drug dealer. The first thing Harlan asked was that if clothes were stolen that they did not look like they were miraculously a perfect fit. And Spock stops Kirk from saving Edith. Kirk would have given up the future for love. Now watch this episode, and yes the changes were necessary and this is one of the best.