A fairly major subgenre of science fiction is military science fiction. I bet you can name at least one book or movie in this subgenre off the top of your head. Starship Troopers. Ender’s Game. The Forever War. Military SF, as the name implies, focuses on military conflicts.
A lot of science fiction focuses on conflict on some sort, but military SF features characters that are members of some sort of military unit. The conflicts tend to have much in common with past or current wars from here on Earth, with tactics and sometimes weaponry being much the same.
The main characters are often member of a specific unit, with comrades and sacrifice being a major theme. There are very few lone heroes in military SF. Technology is normally explained in great detail, as are the military tactics. It’s what you’d expect if you took Band of Brothers and stuck it in deep space as, in most cases, these stories are set in the far future somewhere out in space against an alien species that’s a substitute for whatever side.
Just because something has a “military” does not necessarily make it military SF. In Star Wars, the Empire (and also the Rebels, to some extent) has militaries, with ranks and squadrons and so forth, but it is not military SF. Star Trek has Starfleet, which is very obviously based off the US Navy, but with the possible exception of the later seasons of Deep Space Nine, it also is not military SF. The focus on the story is important here.
Military SF is sometimes assigned political messages, as much of science fiction is, by exploring the folly of war and the sacrifices it forces on those who perpetrate it, as well as how it affects those men and women in the service.
Read/watch a lot of military SF, Squiders? What do you like/dislike about it? What do you recommend for other people looking to get into the genre?