Jack traded his cow for magic beans, which he planted and grew into a giant beanstalk that reached the clouds. At the top was a giant who said "Fe, Fi, Fo, Fum!" and a golden goose that laid golden eggs. Jack climbed the beanstalk twice and brought back treasures from the giant's castle the second time before returning home safely.