So far as I can gather there are, broadly speaking, two types of time travel stories. First, there are stories which explore the mechanics of time travel - namely, the paradoxes that arise from its deployment, and the various ways in which those paradoxes alter the normal rules of the world. And second, there are stories in which time travel is simply a method by which to put the hero(es) of the story in a fish-out-of-water tale, seeing the past, present or future through the eyes of someone, or ones, who are unfamiliar with the customs and mores of the time.
There is a very famous episode of the original series (I've never seen it, for the record) which I gather does a bit of both but which works very hard to explore the paradoxes of time travel. And then there is Star Trek IV, which couldn't care less about paradox and is defiantly only the latter type of time travel story. The script itself is clearly a tape job, with four different screenwriters credited and a production history which apparently involved bringing Eddie Murphy aboard for a major guest-starring part (he decided to do this instead, which is also a total mess but has at least one reasonably funny scene):
So the script was rebuilt around our 7 leads (and one major guest star of a much, much lower level of fame than Murphy) instead. A doctored-up script about the crew of the Enterprise traveling to 1986 to save the goddamned stupid-assed whales should have been, let's be honest, a complete and utter disaster; the fact that the film works as well as it does (though far from perfectly) I will chalk up to the 7 major members of the Enterprise crew, and the easy chemistry they have together, especially when they are given things to do other than genuflecting on the greatness that is Captain Kirk. The film is significantly behind Star Trek 2 in terms of overall quality, but it's a big step up from 1 and particularly 3. The ability to shoot on location in San Francisco, without spending any extra money to "futurize" the place, really helps, especially after the ugly set-work that characterized Star Trek 3.
The plot. In the 23rd century, some fakakta Space Cylinder travels to earth, generally fucking up everyone's shit, because it is trying to communicate with the whales, which have become extinct by this point in time. Meanwhile the crew of the Enterprise, now traveling aboard the Klingon ship they took over in the last film, heads back to Earth to face the music for hijacking and then blowing up the Enterprise. They get to Earth just as the Space Cylinder does and, being the only ship in range that is capable of doing anything, put together a plan to travel back in time to the 20th century, grab some whales, and hightail it back to the 23rd century to allow them to tell the Cylinder to back the hell off, baby. In the 20th century (1986, natch), they get into a number of scrapes and adventures, meet whale expert Dr. Gillian Taylor (Catherine Hicks), and eventually bring her whales, and her, into the 23rd century to save the day. After all of that they are still brought to trial for the crimes of the last film, but all that happens is that Kirk gets busted back down to the rank of Captain and given the command of a brand new Enterprise.
The best thing the script does, by far, is split the crew of the Enterprise into discrete groups, and allow them to each have their own adventures on 20th century Earth, at least for a little while. So Kirk and Spock go chasing after the whales (and they are the ones who meet Dr. Taylor, of course, because she is a classic Bond Girl archetype, even if we're in a different film series, and her time will be spent with the star, who is always and forever the Shat.) Scotty, McCoy and Sulu are in charge of building a container for the whales on the Klingon ship, and Chekov and Uhura are in charge of some sort of engine repair that involves finding a nuclear-powered ship in San Francisco harbor. Each group has one person who is the biggest fish-out-of-water, so with the first it's Spock learning how to use "colorful" language which basically means Nimoy gets to PG-13 swear inappropriately. With the second group it's Scotty, trying to talk to an old-ass Mac through its mouse, and in the third group it's Chekov, who keeps saying "wessels" to the point of diminishing returns and gets mistaken, with good reason, for a Soviet spy.
We open on a dedication to the Challenger crew. This film began principle photography soon after the Challenger disaster, and it's hard to overstate just how much of a deleterious effect the disaster had on America's space program. Star Trek, being a series that draws explicit connections between the current state of humankind's exploration of space and its postulated future trajectory, is more affected than most fictional universes when things like this happen.
The opening song doesn't really leave a lot of mystery as to the tone of the film to follow. "We are making a whimsical movie" is what it screams. It sounds like the theme you would hear right after Ebeneezer Scrooge had his change of heart about Christmas.
Star Trek likes to get good diversity mileage out of the captains of one-off ships. Here, we have a ship at the beginning, discovering the Space Cylinder for the first time, that is captained by a black woman (and apparently piloted by Pei Mei from Kill Bill Volume 2 for whatever reason.)
In order to bring themselves up to speed about what happened to the Enterprise, Starfleet brass pops in their copy of Star Trek 3.
The Klingons make it clear to Starfleet that they want Kirk's head on a platter. One of the things that always turns me off about Star Trek, that I alluded to earlier, is how Kirk-centric it so often is. Kirk is boring.
The matte work hasn't really improved. The Klingon ship parked on Vulcan, where it left off the last film, looks like Thomas Kinkade had a mid-life crisis and started doing sci-fi vistas instead of cabins in winter or whatever the fuck that guy painted.
I'm pretty sure Vasquez Rocks makes an appearance, as a location on Vulcan. Star Trek just really, really loves Vasquez Rocks.
We go from "what is this weird Space Cylinder thing?" to "we are traveling through time" in record speed. This is really not a film that is interested in exploring the science end of the science-fiction equation and, you know, that's probably for the best. The Space Cylinder is really, really stupid, and is such an unloved MacGuffin that you just want it to go away so fun things can happen again.
After the plan is already very clear about going back in time and grabbing some whales, McCoy recaps it in a long infodump. The script here is quite a bit better than Star Trek 3's "treat the audience like they're 6" abomination, but it still can't help itself sometimes.
When the Enterprise travels back through time there is a really batshit dream sequence, with CGI heads of all our crew and Christ knows what else. It really does not fit in this whimsical film.
The movie has your mother's idea of what's hip in 1986. The punk on the bus who Kirk and Spock meet is Star Trek's idea of "cutting edge scary" (without being, to its credit, super racist). I actually think the punk is pretty funny, if only on a meta level that that style of punk rocker was something like 8 years out of date, but the song he is listening to has the basic cadences of punk rock down pretty well, so at least it has that going for it.
"Since the dawn of time, men have harvested whales" according to Dr. Taylor. I question your premise, lady.
The video at the whale center, when Kirk and Spock first meet Dr. Taylor, shows some really disturbing video of whales being flayed, and all sorts of gore and blood everywhere. I'm not sure the best plan to keep the tourists rolling in is to show them Faces Of Death: Whale Edition.
Kirk (to Dr. Taylor): "You're not exactly catching us at our best."
Spock: "That much is certain."
Nimoy's timing really sells this exchange.
Despite Catherine Hicks' bad 80's hair and irritating 80's attitude, she grew on me eventually. I wouldn't want to see her again, but for a single movie Bond Girl-ish type, she gets the job done.
Chekov's escape from the (unbelievably contrived, involving dumb transporter shenanigans) situation in which he gets captured by the US military on board the nuclear wessel is scored to the wackiest music imaginable.
The script starts to really show its seams when we get to the part where Dr. Taylor has her whales taken without her knowledge and then goes to Kirk for help. The night before this happens, Kirk is basically forced to lay out for her that he's a future spaceman who came back in time to save her whales. Then, for no good reason, he refuses to prove this fact to her by showing her the Klingon ship, instead having her drop him off in the middle of a park and then disappearing (by beaming on to the ship, but she doesn't see this part). At this point, no one with any amount of brains would think Kirk was anything but a crazy homeless person, and that is seemingly what Dr. Taylor believes. Then the whales get taken, and the first thing she does is run to the park and start screaming for Kirk. Why? Why would she do this thing? Of all the possible solutions to her problem, the time-traveling spaceman would unquestionably be at the very fucking bottom. But that's what she does, and then she discovers the ship (cloaked, but parked right there) and gets beamed aboard. Kirk is pretty nonchalant about having her come onboard, which really calls into question why he didn't show her the damn thing in the first place, considering how badly he needs those whales and how the ship would have offered proof of his insane story. This whole section doesn't make any sense.
After escaping capture, Chekov has a bad fall and gets re-captured, but this time he's in intensive care and on the verge of death, so Kirk, McCoy and Taylor go to the hospital to rescue him. The "McCoy saves Chekov" scene is not nearly as funny as the film thinks it is. The film plays McCoy's constant dismissals of late-20th century medicine as barbaric with the same sort of wacky and funny tone as most of the rest of the film, but it just comes off as a guy with a chip on his shoulder for no good reason. Rather than being delightfully irascible, he just comes off seeming like a dick, putting down 20th century medicine and then saving Chekov, not with any kind of specialized knowledge, but with a bit of whiz-bang 23rd century technological sorcery. He takes a device out of his pocket, sticks it on Chekov's head, and then he's healed. Well thank you, Doctor Awesome. Anyone could have done what you just did if they had that stupid piece of equipment that you didn't even create.
So after getting Chekov back our crew goes flying after the just-released whales. The whales are being hunted by some pretty embarrassing old-timey whalers, introduced entirely to give the late-game some sort of conflict. I mean, the whales were literally released like a few hours ago and some whaling ship is already bearing down on them? Come on.
After getting back to the 23rd century and saving Earth from the Space Cylinder (and bringing back the whales from extinction through time travel magic), the crew is put through some sort of court-martial trial. But of course, no one even attempts to make Kirk feel bad for all the shit he pulled, they just give him what he wanted (command of a starship) and pretend it's a punishment.