Quote:
Avoid hybrids and commercial varieties. Go for heirlooms, that's the first step
After that it depends on the plant. Nightshades are relatively easy, as you just collect the seeds and let them dry then store them. Tomatoes you can squeeze out the flesh and seeds into water, let it rot and mold up, then strain it out and get only the seeds. I often just pull the seeds out, wash them in a strainer, let them dry once clean, and store them.
Avoid cross-pollination though. Best thing to do is either keep your Tom's and the sort in a greenhouse or keep each variety at least 10 ft apart for best results. Tomatoes self-pollinate but there's always that chance some pollen fell out into a bee or hoverfly, and transferred to another flower.
Melons and Squash are the trickier ones, in a way. One must either watch all female flowers closely and keep them closed until you personally hand-pollinate them with males from another plant of the same variety or keep each variety farther than 30 feet from each other. Any Cuke (melons, watermelons, squash, cucumbers, etc) is open pollinated, right out there in the open air, and pollinating insects LOVE em, so cross-pollination is very easy.
Once the fruit develops, make sure it is fully mature, no matter what the type, then collect its seeds (and enjoy the food!) rinse them until all the sugars and flesh is off, let them dry, and store them.
Greens are trickier though, and they depend on the type. Some are really easy though.