This is a classic German folktale about a mysterious riddle. A young man is sent on a quest to solve a riddle that will lead him to a hidden treasure. Along the way, he must face many obstacles and challenges, including a giant, a dragon, and a witch.
From Wikipedia
"A Riddling Tale" is a type of German fairy tale collected by the Brothers Grimm in Grimm's Fairy Tales. In German, a "riddling tale" is called "Rätsel-Märchen".