
Speculative fiction (‘spec fic’ or ‘SF’) is a genre that broadly encompasses narratives that depart from realism. This includes, but is not limited to, fantasy, science fiction, magical realism, folklore, fairy tales, utopia and dystopia, climate fiction, paranormal and supernatural horror, alternate history and weird fiction. It is characterised by fantastical, supernatural, futuristic or alternative imaginings of the world.
As with many terms, the borders around the genre can be quite fuzzy, for example, near-future climate fiction is inherently speculative but may reflect and extrapolate real-world issues that could plausibly come to pass; in some cultures, ghost stories are mere anecdotes; and historical fiction often speculates on the interiority of real people even if the events of their lives are well-documented.
This Wikipedia article explains the different genres under speculative fiction in more detail and the Internet Speculative Fiction Database indexes speculative fiction authors and works of all types.