My neighbor shared some of his produce and we both think it is some kind of squash but don't know the exact kind. The reason he doesn't know is, the seed packet said its pumpkin and he was thinking he's growing pumpkin until he got his produce :)
Well, those are pumpkins.
While he might have expected the orange "Halloween" kind, there are lots of variations available.
One word of warning, though:
Pumpkins1 contain varying levels of cucurbitacin, a bitter and poisonous compound. Edible pumpkins have been bred to contain very little of it, but eating any bitter kind of pumpkin can be dangerous, even lethal. But normally the bitterness prevents this - it's just very unpleasant. The pumpkins in your photo are a decorative kind and unless the package said otherwise, assume that they are not edible. Also, cross-pollination can lead to higher levels of cucurbitacin than usual in standard edible varieties, so if your neighbor has edible and decorative kinds in his or her garden, they should probably not replant this year's seeds if they intend to eat the next generation.
1 This is true for all members of the pumpkin family, including melons and zucchini/courgettes. Rule of thumb: discard if bitter. Drought stress, for example, can cause uncharacteristic high levels in otherwise perfectly edible kinds.