In more recent times, the boundary between science fiction and fantasy has been almost completely erased from little to no trace of distinction left between the two genres. The shift in taste of modern day readers has contributed immensely and has helped widen the scope of the genres.
Despite the dramatic changes in approach, both genres maintain a level of credibility in setting and plot and of course, there are obvious (and sometimes, conflicting) parallels between the two forms of storytelling. Below, I have outlined these parallels and conflicts but you may have a different opinion or take issues with my ideas. It's a free world.
With all due respect, magic is exclusively an element of fantasy. Of course, there is a fantasy sub genre called science fantasy that burrows deep into the realm of science fiction. That said magic as an element of storytelling is strictly fantasy.
2. Parallel Universes
The concept of a parallel universe existing side by side with the present is a constant feature of both fantasy and science fiction. While SciFi may attempt to access this world through a Time Machine, fantasy's vehicle is usually a magic portal that opens up on another planet, world or realm.
3. Explorations in Science
Science fiction has got to indulge the basics of science or it cannot be science fiction. The plot of a science fiction story must be scientifically grounded and oriented and this is one of the strongest distinctions between the two genres. Fantasy depends on magic for its relevance; science fiction depends on science, naturally.
4. World Creation/Building
Both genres have laws that may survive solely in fictional worlds created especially for the story. This usually works well with fantasy but sometimes, the ideas in a science fiction story may not seem plausible at least, for the next gazillion years. World creation might be the author's only alternative to make his story plausible and relevant to his audience.
5. Space Odyssey
Space travel is an ingredient of science fiction and probably, has no ties with fantasy.
The idea of creating a special language/dialect for fiction is most common with fantasy. Because of the idea of other-worlds that exhibit cultures quite different from ours. Science fiction tales sometimes, require a new tongue especially, where aliens are involved or people from the ancient past (in stories dealing with time travel).
7. Machines (Technology)
I almost left this to speculation, you know it's almost interchangeable with 3. Explorations in Science. But then. I fought against it. Thing is, you can't write a fantasy story where the knight uses a ray gun to pulverize the dragon. Or where the bride arrives just in time for the wedding via FTL. There ought to be an orderly, and consistent relation of parts.
8. Fictional/Weird Creatures
The idea of a world executing its own laws and culture and populated by a different specie of people demands the existence of strange creatures, as well. Both genres are prone to feature weird creatures as part of their plots.
9. Supernatural Beings
Fantasy reeks of elves, dragons, unicorns, werewolves and the likes. These beasts and supernatural beings are void in SciFi. Rather, there is Frankenstein's monster. dinosaurs and every sort of genetically modified creatures. The supernatural is the dividing line between genres. Like someone said, if the process can be explained by scientific formula, it's science fiction.
10. The Laws
All that explaining makes discussing this point at length almost unnecessary. But since there's a method to this madness, there are laws guiding the limits of both genres. Fantasy laws are more or less magical laws while science fiction ones are scientific formulas and laws.
But I suppose, I won't be excessively forward if I said the distinguishing line between fantasy and science fiction is fast diminishing and might be rendered obsolete and put out of use effectively, a few years from now. After all, science is the new magic.
Keep your pen bleeding!