When I first started learning about plant anatomy and sexuality (racy, I know), one of the things that surprised me most was that some plants have male and female flowers. As it turns out, all the plants in the cucurbit family have male and female flowers. This includes cucumbers, squash, pumpkins and melons.
Pollinators transfer the pollen from the male flower to the female flower, and the female flower produces the fruit. The male flower is on a slender stem, and will fall off on its own after about a day. I saw this happening and thought there was something terrible snipping off my blossoms, but it’s a normal part of the process.
You can identify the female flower because it has a miniature version of the fruit growing directly behind the blossom. Once the flower is pollinated, the miniature fruit starts to develop, and that’s how you get a zucchini or a pumpkin or a cantaloupe.
After I pulled up my zucchini plant which succumbed to squash vine borer damage, I later noticed it had two pristine examples of baby zucchini on it. How sad. :(
Since it’s only the female flowers that produce the fruit (which, by the way, is a botanical term, while “vegetable” is a culinary term and does not refer to a specific plant part), you can pick off the male flowers and eat them without reducing your plant yield. You just want to make sure there is a male flower left to pollinate the female.
Especially at the beginning of the growing season, the plant tends to produce male flowers before producing any female. This is a good time to pick the male flowers and use them in cooking, since you don’t have female flowers to worry about. This is why there are about 100 million fried squash blossom recipes online. I haven’t eaten a fried squash blossom yet, but if I can capture some blossoms before they wither at the end of the day, I’d like to try my hand at making them.