Kirk and his close-knit crew has taken refuge on Vulcan because they are in trouble for stealing the Enterprise in THE SEARCH FOR SPOCK. It's three months after that movie and they all decide to return to Earth for the consequences of their actions. But before they reach their home world it's attacked by a huge, mysterious probe that causes violent weather. It keeps transmitting a message that Spock realizes is "whale sounds", though whales are now extinct on Earth. They surmise that if they are able to get a whale that the creature will respond to the Probe and the destruction will end. So they create a time-warp and go back in time to the mid 1980's. Since the Enterprise was destroyed they do this in the Klingon ship they had taken from Krug in the previous movie.
They arrive in San Francisco and quickly find two whales that are being kept at a marina. However, they are going to be let go in the wild very soon, much to the dismay of marine biologist Dr. Gillian Taylor (Catherine Hicks of TUCKER'S WITCH, CHILD'S PLAY), who is emotionally attached to them. Kirk tries to convince Gillian that he's here to protect the whales and it's not until she sees the actual spaceship that she believes him.
First, I must say that I like this movie, though it's the least-STAR TREK of all the feature films, from the chintzy non-theme music to the overall comedic tone. Sure, there are some harrowing bits, like with the giant Probe about to destroy the Earth and Chekhov almost dying aboard a nuclear wessel, but the rest of the movie is very light. The most important thing it does is restore Spock to normalcy.