"Star Trek IV: The Voyage Home" holds a special place in the "Star Trek" canon: it's the goofball time-travel comedy in the middle of a bunch of "serious" movies. I should admit that, while I've seen most of the "Star Trek" movies, I haven't seen either "Star Trek III" or "Star Trek V" as they both have terrible reputations. Nevertheless, I have a fairly good idea what went on in "III," and it's important to this one. After "II," Spock's body is laid to rest on the Genesis planet, which resurrects him, so his behaviour in this movie is odder than usual.
The command crew of the Enterprise are returning to Earth in a stolen Klingon Bird-of-Prey to face a variety of military charges arising from their actions in the previous movie when an enormous probe of unknown origin approaches Earth. Its transmissions severely damage the entire world's power grid. Kirk and crew receive the distress call, and figure out they have to go back in time to retrieve some now-extinct humpback whales who can answer the probe's queries. The rest of the movie is silly fun with the crew from the future not fitting in particularly well in the San Francisco of 1986. They get a lot of help (and something of a love interest for Kirk) from a whale biologist (Catherine Hicks) at an aquarium in Sausalito.
There are a number of what now (2016) seem like fantastically cheesy lines, of which Scotty gets the worst. The end result is heavy-handed about humanity's destruction of our environment (specifically whales), often funny, and generally fun. It's certainly not the best Star Trek (that honour goes to "Star Trek II: The Wrath of Khan"), but it's definitely one of the more enjoyable in the very large Star Trek catalogue.