The Forever War is a military science fiction novel written by Joe Haldeman and published by St. Martin’s Press in 1974. It was followed by the sequels Forever Peace (1997) and Forever Free (1999) and A Separate War (1999), but it works as a standalone book (presumably having been sold and published as one).
The protagonist of the story is William Mandella, a soldier in an interstellar war against an alien adversary (known as the Taurans) that no one understands. Even though humanity now has the technology to travel through wormholes for quicker interstellar travel, travel is still very slow from a bystanders point of view, and because of time dilation at very fast speeds, relatively fast for the travelers. This has major implications for the length of the war as well as the way an arms race will play out, because when your ship and a Tauran ship make contact their technology could be hundreds of years more or less advanced than yours depending on the planet of origin and time of departure. Mandella, through several long tours, experiences a much longer stretch of the war than most of his fellow soldiers, taking some civilian time in between.