Science fiction explicitly includes some plausible technology not in existence at the time of writing and not known by the author to be impossible; and that technology is necessary to some aspect of the plot. (Alternately, the story may take place under substantially different physical conditions [an alien planet] and those conditions are relevant to the plot.) (A rarer alternative to this posits the absence of a present technology and plays with the consequences of that absence.)
This is made clearer by considering stories set far in the future. The characters don't actually exist, but that by itself doesn't make those stories science fiction.
Fantasy has elements known to be impossible within the context of current knowledge. Magic and the power of wishing are fantasy.
So who was it who said "Any sufficiently advanced technology is indistinguishable from magic" - a SciFi author or a Fantasy author ?
Which genre is, just for one example, Dr Who - the technology central to the plot being known to be impossible within the context of current knowledge?