Fantasy books sometimes overlap with science fiction books, although they are always not the same. If you have a taste of fantasy, chances are higher that you have a heart for sci-fi too and vice versa. You can clearly distinguish between fantasy and sci-fi in most cases, but there are no rules to distinguish them. Harry Potter series is pure fantasy while Time Machine is purely sci-fi. Fantasy books come with some magic, supernatural powers etc, while sci-fi characters are made more believable by defining technology, timelines and possibilities and the topics sci-fi writers choose generally will be of interest by common man.