This is a famous children's story, and it seems to have come from England, but it could take place almost anywhere. The setting seems to be a rural area, like a farming community, since Jack and his mother have a cow that gives them sustenance (until Jack sells it, in exchange for "magic" beans); they then plant the beans, which again, seems to indicate they live on a farm or near a field of some kind.