The riddle
What Do You Get When You Drop a Pumpkin?
Two squashes
As a verb, squash means to crush or press flat, which is what happens to a pumpkin that lands hard. As a noun, it names a group of garden plants, and a pumpkin is a cultivated winter squash. Round, orange kinds of winter squash are the ones called pumpkins, and in Australia and New Zealand the word pumpkin is used for winter squash in general. The riddle is satisfying because both meanings are true together.
The same spelling, different words
The verb comes from an Old French word for crushing. The plant name is a shortening of a word from the Narragansett language. They arrived separately and happen to be spelled alike, which is the coincidence the joke depends on.
Telling it
Hold up a pumpkin, real or pictured, and let go of it in your imagination as you ask the question. Some listeners picture the mess on the floor and some think of the vegetable, and both are right.