Jack traded his family's cow for magic beans given to him by a stranger. When the beans grew overnight into a giant beanstalk reaching the clouds, Jack climbed it and discovered a castle inhabited by a giant. Jack took the giant's gold and other treasures like a golden egg-laying hen and magic harp while the giant slept. Each time Jack returned home with more riches, angering the pursuing giant. Finally, Jack chopped down the beanstalk, defeating the giant and providing himself and his mother with wealth and happiness from then on.