To harvest zucchini seeds for next year's planting, you let the fruit ripen waaaaay past edible, collect the seeds, and then ferment and dry them.
This post has all the details for harvesting and processing your zucchini seeds.
Ideally you will have hand-pollinated a zucchini to ensure the seeds haven't accidentally cross-bred, and then left it alone for about an extra month.
This is what it looked like right after I pollinated and netted the flower:
And this is what it looked like after I harvested it 5 weeks later (with a coffee mug for scale):
And with a 5-year-old for scale:
You'll know it's ready for harvest when it stops getting bigger and the skin is hard like a pumpkin.
Cut it open and scoop out the seeds
Just like with a pumpkin, you'll need a heavy-duty knife. Be careful! It will be hard, tough, and awkward.
Parents: This is a great sensory play activity for kids. The innards of the zucchini are slippery and gritty, and soft enough that kids can scrape them out themselves with a spoon.
Add water and let the seeds ferment
Fermenting will clean gunk off the seeds and improve germination. (Fermenting is part of saving tomato seeds too!) Add just enough water that the mix is like a slurry, and then leave it somewhere warm for a day or 2.
The seeds are done fermenting when they smell a bit sour, and the seeds themselves feel less slippery and gunky.
This is what mine looked like after fermenting. They smelled a little yogurt-y.
Separate and dry the seeds
Add a bit more water to the fermented slurry. The good seeds are heavy, and will sink. Everything else will float, including the empty shells of bad seeds. Gently pour off the extra material, being careful not to discard the seeds.
Give the seeds one more rinse, and then lay them out to dry on a screen or paper towels, rotating frequently to make sure you don't get damp spots. When the seeds are completely dry, store them in paper, in a cool, dry place.