Starship Troopers by Robert A. Heinlein
Hugo Award winner.
The story takes place in a future where full citizen rights are only given to veterans, although 18-year-olds are free to choose not to join the military and not become citizens. And there are plenty of people who'd rather do it that way.
Juan Rico comes from money. His family would think it was foolish to join the military, and it doesn't have a great attraction for him either. But one thing leads to another and he ends up in the service. He ends up in Mobile Infantry during the "bug war" - fighting insectoid aliens who have a hive society. It's a messy, dangerous war for the Mobile Infantry, which has the job of going to other planets and trying to fight the "bugs" on the ground on the bugs’ turf and in their hives.
The book follows these exploits and Rico's growth in the process.
Some criticize this book for being militaristic, anti-democratic and such. I'm no expert on Heinlein's political beliefs. The book's story is about the military and that will not appeal to all readers. For readers who would not avoid military SF in general, I would suggest the following. Try taking it in the context of Heinlein's next novel, Stranger In A Strange Land. In Starship Troopers, it is practically enough that the aliens are "bugs" to justify humans being better and the war being justified. In Stranger In A Strange Land, what makes the protagonist an extraordinary individual with ways to help humanity is the fact he was raised by Martians. Perhaps we don't have to take Starship Troopers as a blood-thirsty kill-all-aliens manifesto. Perhaps we do not need to take Starship Troopers' kill-the-bugs frenzy as an attribute of a healthily-militaristic society.
It also seems pretty ironic to me if Heinlein was advocating a militaristic society, but chose to do so by presenting us with a war against a hive society.
The solutions for humanity offered in "Stranger" are not militarism, traditionalism, restrictions on individuals or anything like that. Rather, "Stranger" has sometimes been called a manual for the 1960s hippie culture. The culture being built in "Stranger" shows little if any resemblance to the society in Starship Troopers. Even if Heinlein intended Starship Troopers to picture a utopia, one can read it as something more like a dystopia, a cautionary tale or just a youth's personal changes. Sometimes a reader can gain something by knowing the author's real world personal opinions. Still, a novel can have value both in literary terms and in re-interpretations, no matter what the author was thinking.