Military science fiction is a subset of science fiction/space opera where interstellar or interplanetary conflict and its (usually) armed solution make up the backdrop of the story. The Star Wars movies [someone who has read the books please add them if you agree] could be considered part of this genre, while Star Trek Voyager, which is more based on compromise and negotiation than military action, would not.
A very popular series, and a recommended intro to this subgenre is David Weber's on-going Honor Harrington series, which comes with 'reasonably' logical technology, believable plot, and (disputed by some) outstanding character depth.
Another of the defining authors of the genre is David Drake, especially with his Hammer's Slammers series, but also with many of his other works.
Other examples:
- Clash by Night (1943) by Lawrence O'Donnell (a penname of Henry Kuttner), depicting companies of mercenaries used to fight wars between fortified city states beneath the surface of the Venusian ocean after the nuclear destruction of Earth.
- Starship Troopers (1959) by Robert A. Heinlein
- Bill, the Galactic Hero, (1965) Harry Harrison's parody of the whole genre.
- The Forever War (1975) by Joe Haldeman
- Armor (1984) by John Steakley
- Broken Angels (2003) by Richard Morgan
- The Miles Vorkosigan books by Lois McMaster Bujold