Squash is the fruit of a vine plant that grows wild in Central America. Squash probably evolved around the same time as the other flowering plants, about 350 million years ago. Squash depended on large animals like camels and horses to eat it and then carry the seeds to new locations.
People probably started using squash - dried and hollowed out - as cups and bottles, and maybe as floats for fishing nets, as soon as they got to Central America, maybe about 13,000 BC. Not very long after that, maybe about 10,000 BC, people started farming squash, making squash one of the earliest plants to be farmed. That turned out to be lucky for the squash, because people also wiped out most of the big animals, and without them many wild kinds of squash became extinct.
People probably didn't start to eat squash, which originally tasted bitter and was even poisonous, until several thousand years later, after breeding it to be sweeter and not dangerous. The Norte Chico people, further south in Peru, farmed squash to eat (and also for fishing floats and containers) about 3000 BC.
Squash come in two kinds, summer squash and winter squash. You pick summer squash in the summer, and they have soft skins that you can eat, like zucchini and yellow squash. You pick winter squash in the fall, and they have thick hard skins that you don't eat, like pumpkins, butternut squash, and acorn squash. Winter squash are harder to cook, but you can store them all winter without them going bad, so they were an important food you could eat in the winter when nothing was growing.
People in Central America grew squash as part of the Three Sisters - squash, beans, and corn. The corn provided support for the beans, while the squash kept the weeds down and kept the water from evaporating.
By about 100 AD, the Pueblo people further north (in modern Arizona) were also farming squash, and over the next several hundred years people began to grow squash further and further north and east - first the Mississippians, then the Shawnee and the Sioux, then the Cherokee, and finally the Iroquois about 1000 AD.
In the summer, people often ate the flowers of squash plants. After the harvest, people roasted winter squash whole in the coals of a cooking fire, and then cut it open and scooped out the seeds. You could roast and eat the seeds, or you could press them to get oil for cooking, like sunflower seeds. You could also eat the roasted orange flesh, or make it into squash soup or succotash.