Science Fiction is a genre of speculative fiction, typically dealing with imaginative concepts such as advanced science and technology, spaceflight, time travel, and extraterrestrial life.
Fantasy is a genre that usually involves a mystical base, i.e. magical, mythical or supernatural, imagined worlds.