Squashes are masters at crossing with their neighbors. Even varieties that are very different in appearance, such as zucchini, pumpkin, pattypan, and vegetable spaghetti are all derived from the same species (Cucurbita pepo) and will cross readily. The fruits that result from crossed seed will be hybrids, therefore likely intermediate in appearance, taste, and texture between the two parents, and not usually what you want.
If you intend to harvest squash seeds for next year’s sowing, it’s therefore best to limit yourself to growing only one variety in your entire vegetable garden. In community gardens, where a wide variety of squashes are sown, it’s probably best not to save seeds.
Commercial producers of squash seed leave a mile (about 1,6 km) between plants to ensure varietal purity. Even then, it sometimes happens that a squash plant you sowed produces fruit that looks nothing like those in the seed pack’s picture. If so, just blame an errant bee!