Especially if you live in the South, the green worms in the fruit might be pickleworms--pale green with brown heads, up to about 3/4" long. They might have reddish-brown spots, depending on the stage of larval development. To help prevent them from boring into the fruit, spread mulch around or keep the fruit off of the ground. They like to feed at ground level. They might also tunnel into flowers, buds, and stems, but prefer the fruit. A larva will eventually spin a thin cocoon, perhaps rolled in a leaf, and pupate. Adult brownish-yellow moths emerge in about 7 to 10 days; they are active at night. Early-maturing varieties are good to combat pickleworm, so that they mature before the peak of the pickleworm population. Also, because the moths are active at night, covering the squash with row cover overnight will help to prevent them from laying eggs on your squash. Remove the cover during the day, to allow pollinators such as bees to visit the flowers. Some varieties of squash are more resistant to pickleworm, such as Butternut 23, Summer Crookneck, Early Prolific Straightneck, and Early Yellow Summer Crookneck.
If the larvae you see are not pickleworms, perhaps they are melonworms? Green larvae, usually with two white stripes (depending on larval stage). But these usually attack leaves, or sometimes the surface of the fruit. It's less common for them to tunnel into the fruit. See:
Especially if you live in the South, the green worms in the fruit might be pickleworms--pale green with brown heads, up to about 3/4" long. They might have reddish-brown spots, depending on the stage of larval development. To help prevent them from boring into the fruit, spread mulch around or keep the fruit off of the ground. They like to feed at ground level. They might also tunnel into flowers, buds, and stems, but prefer the fruit. A larva will eventually spin a thin cocoon, perhaps rolled in a leaf, and pupate. Adult brownish-yellow moths emerge in about 7 to 10 days; they are active at night. Early-maturing varieties are good to combat pickleworm, so that they mature before the peak of the pickleworm population. Also, because the moths are active at night, covering the squash with row cover overnight will help to prevent them from laying eggs on your squash. Remove the cover during the day, to allow pollinators such as bees to visit the flowers. Some varieties of squash are more resistant to pickleworm, such as Butternut 23, Summer Crookneck, Early Prolific Straightneck, and Early Yellow Summer Crookneck.
For more information, see:
http://entnemdept.ufl.edu/creatures/veg/pickleworm.htm
If the larvae you see are not pickleworms, perhaps they are melonworms? Green larvae, usually with two white stripes (depending on larval stage). But these usually attack leaves, or sometimes the surface of the fruit. It's less common for them to tunnel into the fruit. See:
http://ipm.ncsu.edu/AG295/html/pickleworm_melonworm.htm
http://entnemdept.ufl.edu/creatures/veg/leaf/melonworm.htm