When an alien vessel passes them going at over warp 30, the Enterprise crew realizes that it is heading directly for a supernova. After communication gains nothing, the Enterprise locks a tractor beam onto the ship. While the connection slows the ship down, it does nothing but drag the Enterprise into the supernova at an unreasonable warp factor.
Once they pass through the exploded star, the crew of the Enterprise realizes that they have entered an alternate universe where time flows backward. People are born old and then regress to infancy when they die. This has the same effect on the Enterprise crew, as they begin the de-age. Fortunately, the aged Commodore Robert April, the first commander of the Enterprise and his wife are aboard the Enterprise.
April and his wife get younger, but they retain their abilities to pilot the ship when all others return to infancy and no longer have the knowledge to carry out their duties. They bring the Enterprise back to their home universe and are able to restore them to their normal age using the transporter.
The idea of time traveling backwards in this manner has been used in other contexts, but it always seems to take the appearance of a gimmick. The complexity of someone growing younger and smaller, with the need to shed mass, makes it absurd. Finally, the crew is restored using the stored transporter patterns, in this case the transporter would have to add significant mass, which would also be an exceedingly difficult operation. The transporters are designed to precisely duplicate mass, not add or subtract to it.