Science fantasy is an inter-genre of speculative fiction and more specifically of Science Fiction / Fantasy that includes equally the tropes of both fantasy, such as magic, iron age technology, and fantastical creatures like dragons and unicorns, and science fiction, such as technology, spaceships, and so on
According to Wikipedia, some of the main subgenres of science fantasy are:
- Dying Earth 
- Post-apocalypse 
- Planetary romance / Sword and planet  – e.g. Edgar Rice Burroughs‘ John Carter of Mars, essentially, proto-Space Opera rendered absurd and obsolete by modern discoveries of the actual conditions on the surface of Venus and Mars
Everyone has their own definition, and that fact that each of the above has variously been included under straight science fiction and straight fantasy shows how fluid these distinctions and categorisations are; hence my preference for the term Science Fiction / Fantasy, or sff for short .
My own preferred forms of science fantasy, not included in the above list, are Cyberpunk Fantasy and Space Opera Science Fantasy.
Cyberpunk Fantasy is represented exclusively by the roleplaying game franchise Shadowrun which equally includes classic cyberpunk tropes such as hackers and mecgacorps with classic D&D magic and High Fantasy races in a single universe
Space Fantasy as here defined includes any space opera that combines one or more fantasy elements such as swords, magic, elves, orcs, etc, with standard Space Opera tropes such as spaceships, energy weapons, galactic empires, robots, and so on. The classic example is Warhammer 40K (which can be considered science-fantasy-horror, and is more Fantasy Heavy than even Shadowrun), but J S Morin‘s Black Ocean series (essentially an FTL version of Joss Whedon’s Firefly, with Wizards rather than tech to generate artificial gravity), can also be mentioned, although it doesn’t have humanoid fantasy races> In this regard, my own Alcione-verse is more like WH40k, although with less munchkinism and grimdarkness and orientated to a more metaphysical perspective.
Star Wars Type Science Fantasy Despite the fairy tale crawl (a long time ago) and reference to “The Force”, Star Wars is actually more science-fail space opera than Science Fantasy. But it’s mentioned here to distinguish it from the other two, more strictly fantasy cross-over, settings.
 Wikipedia includes these together, but they are clearly distinct; as post-apocalypse is set in the near future, and Dying Planet thousands or millions of years hence)
 It is not clear why these are placed in two different categories by the Wikipedia editors