Specifically, in the Starship Troopers book you could get citizenship from any form of service, the sole and entire perk of citizenship was the right to vote, the and they actively tried to prevent people from enlisting in the military just to get it. Also, the government was an ordinary republic of the sort anyone today would recognize. Both wars we see are defensive, with one being negotiated to a peace and the other heading toward an extermination war only because the bugs refuse to coexist. There's also at least one alien race that is on friendly terms with Earth.
In the Starship Troopers film the military was the only path to citizenship, you lost a lot of rights (up to and including easily having children) without it, and the entire system was designed for the purpose of indoctrinating people into cannon fodder for the entirely military government's wars, which are implied to be started by said government for the purpose of keeping the populace in line. The only war we see is a war of extermination, which is implied to be merely the latest, and the bugs are the only aliens.
The book was principally an examination by Heinlein of the all-volunteer military taken to extremes and applied to all society via a "restricted universal suffrage", where only people who were invested in making the system work had the vote.
The film was an unrelated schlocky movie that had elements of the book's plot pasted on after getting the license,led by a director who declared the book fascist at a quick read of the early chapters and never finished the thing.