Science fiction deals with reality. Fantasy is all about escaping reality.
Science fiction takes a long, hard look at what we know and where the state of our knowledge is going. It then speculates about where we will be in some time, or what will happen to us if certain other things happen. It wonders about the future by moulding the present into all possible shapes — and this is important: all possible shapes. Reality is valued in science fiction. In fact, reality fuels science fiction. In the presentation of it, science fiction has to be credible.
Fantasy has no such constraint. It is about using reality as a foundation and launching off into other worlds. And even that is not mandatory. Fantasy can rewrite the rules of reality and form impossible people, places, and scenarios. It can play with the stuff of thoughts and build a universe out of it. Fantasy owes nothing to our expectations of credibilty and, in fact, points and laughs at them.