This is known as the three sisters method. From experience I can tell you to not use it for sweet corn and don't plant either the beans or squash until after the corn stalks are at least 10 inches or 25 cm tall. The squash will shade the corn and your germination will be diminished. The beans will look for something to climb soon after sprouting and need those stalks to be available. They will wind their way very tightly around whatever they're climbing and it becomes almost impossible to harvest the corn at a fresh eating stage. This is why the planting method is best reserved for corn that is meant to be left on the plant and made into cornmeal, masa, or hominy.
Bit of wisdom that my Grandpa taught me is that you should choose a squash or pumpkin with prickly stems so as to deter raccoons and squirrels from entering your patch and trying to climb the cornstalks.