To properly collect and store seeds, there are several things you must know.
First, I will start with when to collect seeds. This first step is critical.
Seeds should be collected only when they are mature. Watch for the plant to flower, since this is when seed production happens.
A few signs to look for: Mature seeds usually darken, begin to dry and are firm. Collecting green, moist seeds will likely fail to germinate.
As seed pods form, they will crack open to disperse the mature seeds. Try to collect prior to this. If collecting seeds from fruits, avoid ones on the ground for any length of time since disease and insects might jeopardize seed viability.
Once collected, most seeds should be air-dried. If pulp is stuck on seeds, clean them to keep away mildew.
Seeds should be stored in a breathable container, like a paper sack. Putting them in a plastic bag could cause them to mold and rot. Seeds should be kept in a cool, dark environment with low humidity, such as a refrigerator or garage for safe-keeping until planting, usually within a year.
One exception: Seeds from fleshy fruits need to stay in a moist medium or be planted immediately.
There is a wealth of information on various websites or in books that can guide you through the process. I used the Ladybird Johnson Wildflower Center website for most of my information.
With a little experience and trial and error, you can successfully grow your own plants from seeds you collect.