Science fiction is a genre that deals with the impact of actual or imagined science upon society or individuals. It is often called the "literature of ideas" because it contains such a wide variety of concepts. Sci-fi is divided into two main categories - hard science fiction and soft science fiction.
Hard sci-fi is based on fact. It deals with the "hard" sciences like physics, chemistry, and astronomy. Soft sci-fi explores the "soft" sciences, like psychology and anthropology.
There are many sub genres of science fiction, such as the space opera, dystopian fiction, cyperpunk and steampunk. You can read a little more about those in the PDF linked below.
Fantasy is a genre of literature that features magical or supernatural elements that do not exist in the real world - such as wizards, giants and dragons. By cpntrast, science fiction contains technology or scenarios that are currently possible, or may become possible in the future.
Fantasy novels often include common themes like good vs. evil, epic journey, betrayal and the reluctant hero.
There are many sub genres of fantasy - high/epic fantasy, magical realism, fables - see the PDF below for more information!