What is speculative fiction? Well, that depends who you ask.
Some see speculative fiction as an umbrella term for any fiction with supernatural, futuristic, or fantasy elements. Others see it as books that ponder questions like, "what if this happened?' and "what if the world were this way" -- in other words, speculate. And still others see it as a mish and mash elements from multiple genres that break the mold. I like this last definition, myself. In the past year I've seen so many books published lately that fit into sci-fi, fantasy, or horror, but bend the genres and include pieces that make them hard to categorize. The librarian in me wants to categorize them -- here's your fantasy, here's your horror -- but the reader in me delights in the unexpected mix of elements, often in a book I first took for just one thing. Though is any good book just one thing?
Take Akwaeke Emezi's Pet as an example of what I mean: a novella set in a near-world society much like our own, except that it has rid itself of monsters (utopia). Teenage Jam meets a terrifying creature from another world named Pet, who emerges from a painting when a drop of Jam's blood is spilled on it (fantasy). Pet's come to hunt a monster... and the monster is in Jam's house (horror). So there you have utopia, fantasy and horror mixed together in a novella and which genre, my dears, do we set that inside? (the library places it simply on the fiction shelf, which makes things a lot simpler.)
This list includes just a few of my favorites in speculative fiction. Curious to learn more? This Book Riot article is a great introduction to the history and more recent definitions -- Margaret Atwood and Ursula K. Leguin had a famous debate about it -- of speculative fiction.