One might postulate a gradation from "hard science" in which everything has a physical technical explanation, to some psionic or mystical elements, to full fantasy. This does not have to be a simple linear sequence, since there can also be an overlap, in which the same universe may have elements of fantasy and hard science. Also, the "magical" element itself may be anything from fantasy to horror to psionics to mysticism.
The following gradation is adapted from the original Grading Science Fiction for Realism page
HARD-NOSED SF: Employs rationalistic, physical, strictly technological, even materialistic and physicalistic explanations. Does not include magic, mysticism, fantasy, or the supernatural of any sort. The writing may be very hostile to any supernatural, religious, or other such idaes.
AGNOSTIC SF: Mysticism, occultism, magic, etc, may or may not exist. Indeed some inhabitants in the universe in question act as if they definitely do exist., But the setting itself remains completely agnostic to these things, leaving it up to the individual reader to interpret it as they will.
PSIONIC SF: Specifically includes telepathy and other non-physicalistic phenomena, but in other ways presents a rational and rationalistic view.
SCIENCE FANTASY: claims to be SF, and indeed has or is based on self-consistent SF elements that would otherwise include it under SF, but also includes one or more supernaturalist elements that remove it from the realm of pure SF. George Lucas uses the term "Space Fantasy" to describe his work, although it seems to me that - except for its fairy tale prologue ("a long time ago in a galaxy far away") - Star Wars can more properly be included with other Soft Sci Fi popular universes. The only "fantasy" element in SW is The Force, and even this is explained in technobabble terms (midichlorians") in the prequel trilogy.
Science Fantasy is a sort of overlap with sci fi, but contains specifically fantasy elements, and hence does not describe the universe in a rational way, although it still has rational elements.
NOT SF: Makes no attempt to follow physical laws as we currently understand them, or infuses a magical technology that works for unknown reasons.
Although Pure Fantasy, and also Horror, are distinct genres to Science Fiction, some journals publish all of them together. Also in Sci Fi Entertainment forums and media (magazines, websites, etc), "Sci Fi" is used as a generic term that also includes fantasy, horror, supernatural stories, and so on.