Warning: Wikipedia contains spoilers
As the subtitle 'Faust Eric' indicates, the story is a parody of the tale of Faust.
After having been trapped in the Dungeon Dimensions at the end of Sourcery, the wizard Rincewind is summoned back to the Discworld by the aspiring demonologist Eric, who mistakes him for a demon and expects him to fulfill three wishes for him. To his surprise, Rincewind finds that he is able to do so. However, he has no control over the way the wishes are fulfilled - and so Rincewind and Eric are involuntarily sent through space and time.