Some questions which are often debated: what is the difference between science fiction and fantasy, how do they relate to mainstream fiction, and is this changing?
The flip answer to the first question is that anything with spaceships is SF, anything with magic is fantasy. This is generally true, but James Schmitz's wonderful 'The Witches of Karres' includes both. A more considered view is that at least some attempt is made in SF to convince the reader that the story just possibly might happen, but in fantasy anything goes (although internal consistency is still required). The distinction is very clear at the extremes: Kim Stanley Robinson's Mars trilogy is obviously SF, Tolkien is obviously fantasy. However, as is often the case, there is a big grey area in between.
Some stories seem to be pure fantasy, such as Ann McCaffrey's 'Dragonflight', but she slips in a reference to the colonisation of the planet which gives it some kind of SF justification. It is not uncommon to find stories like which are a mixture of SF and fantasy elements (as instanced by Orson Scott Card's 'A Planet Called Treason', reviewed below).
The distinctions are further confused by the fact that both genres are subdivided. Some of the subdivisions are concerned with the type of plot, such as 'space opera', which tells you to expect galactic empires and battling fleets of spaceships, and 'epic fantasy', usually concerned with quests vital to the future of the world, for the mythological all-powerful grail/ring/sword (delete as appropriate). However, some sub-genres are more subtle and less clear-cut.
SF is often divided into 'hard' and 'soft', but different opinions can be found as to the precise distinction between them. Some apply the academic test: 'hard' is to do with the natural sciences (focusing on physics, chemistry, biology and technology in general), 'soft' to do with the social sciences (psychology, sociology, the impact of the future on humanity). Obviously, it's a question of balance; most SF will include something of both. A different view regards 'hard SF' as excluding technology which current science regards as impossible: sub-light-speed interstellar travel using generation ships or frozen sleep is acceptable, faster-than-light starships or artificial/anti-gravity machines are not. Time travel and psionic abilities such as telepathy and teleportation (all traditional SF themes), are also excluded from this definition of 'hard SF'. A further complication is the recent promotion of 'mundane SF', which is harder than hard: it excludes interstellar travel and aliens, and is restricted to known science within our solar system. At this point it may be difficult to distinguish SF from some mainstream fiction such as those thrillers which are set slightly in the future and include yet-to-be-built technology.
Fantasy also has its subgenres. Epic fantasy has already been mentioned, but there is also contemporary (or urban) fantasy, set on Earth in the present day, while vampire and horror fiction are also subgenres. In fact, some fantasy supporters claim that SF itself is just a subgenre of fantasy, although a more acceptable overarching term for SFF is 'speculative fiction' which also includes the genre of alternate worlds (which examine what might have happened in history if critical events had turned out differently).
Mainstream fiction is often described by its supporters as 'literary' or 'serious' fiction: terms clearly intended to be dismissive of all genre fiction (not just SFF). This literary snobbery would be amusing if it weren't so sad. It harks back to an earlier age, when the stereotypical SF fan was a geeky adolescent and his reading matter was a comic with a cover featuring rocket ships and/or scantily-clothed busty women being threatened by alien monsters. This view of SFF as being 'not serious' and 'intended for adolescents' has probably only been reinforced by the success of the Star Wars and Harry Potter films.
Not that there is anything wrong with having fun. There can be joyousness in a good space opera or fantasy which is usually missing from mainstream fiction, as well as the famous 'sense of wonder' evoked by a compelling far-future vision (although that is harder to generate than it used to be in the golden age of SF, when lots of ideas first emerged). While early works might have been somewhat lacking in writing quality, much modern SFF is beautifully written, fully comparable with the 'literary' works. Furthermore, modern SF often deals with themes which are far bigger than the interpersonal relationships which so dominate the mainstream. Themes such as how humanity will be affected by the rapid growth of cyberspace, against the background of a world in which we are using up the resources and changing our environment at an accelerating rate. Arguably, such fiction is a lot more serious and important than the relatively trivial concerns of most of the mainstream.
While fantasy and space operas will always be essentially escapist (and long may they continue – we need some respite from reality from time to time), it seems possible that the gap between mainstream fiction and the more serious end of SF will narrow even further in the future, as the predicted developments in cyberspace and changes to our planet's environment become part of the backdrop to our lives. Established mainstream authors have already written novels with SF themes, for example P.D. James' 'Children of Men', recently turned into a feature film, although they are usually careful to avoid the results being categorised as genre fiction. At the moment such crossovers are uncommon, although I suspect that they might increase. Perhaps we will see a return to works comparable with Orwell's '1984' or Bradbury's 'Fahrenheit 451' – a merger between SF themes and the literary mainstream. In which case, 'mundane SF' could have a big future.