Depends on the species. They will not cross across species, but readily cross within species. Most summer squash except Trombocino are C. pepo. Many pumpkins are also C. pepo, but some C. maxima. C. moschata, and C. mixta are also sold as pumpkins. Winter squash may also be C. pepo, C moschata or C. maxima. Within species, they are insect pollinated, so to save seed they need to be separated further than a bees flight path. Not a problem unless you are saving seeds as the cross does not show up until the second generation. I interplant, crooknecks, straightnecks, scallops, zucchinis acorns, delicatas which cross promiscuously. But not in the immediate generation. Saved seeds or volunteers will result in some weird squash tho.