Fantasy fiction is about magic, science fiction is about … well, science. People who believe in one do not always buy into the other, yet the two can merge. As Arthur C. Clarke wrote, a sufficiently advanced technology cannot be distinguished from magic. Besides, some magical visions represent such deep human yearnings that we ardently wish they were real.
These visions often appear in fantasy, myth, and legend, where they are “explained” simply as being magical. They might reappear in the newer genre of science fiction, justified by more or less credible scientific explanations. And sometimes, if we are lucky, there’s a third step where the idea moves out of fiction altogether and becomes real.