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. People probably started eating squash 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.
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.
Or check out this article about squash in the Encyclopedia Britannica.