There are three kinds of barriers to crosspollination: genetic barriers, physical barriers, and temporaral barriers. First we’ll cover how tomatoes are crosspollinated, then how to prevent crosspollination.
Tomatoes are natural self-pollinators. The flower structure is such that the stigma is surrounded by the anther cone. As the stigma extends, it may protrude beyond the anther cone which makes it available for crosspollination. Under normal conditions, most tomatoes have a natural cross-pollination rate of about 4%. Under some conditions though, this can be much higher. There are some varieties developed since 1930 in which the stigma always stays enclosed in the anther cup. These varieties almost never get crosspollinated. Most heirloom varieties fall into the category with partially extended stigmas and a few have a split anther cup which exposes the stigma. Heirlooms as a rule are likely to crosspollinate though at a low rate overall.
Tomatoes are a flowering plant in the nightshade family that produce pollen but not nectar. The pollen is collected by several species of insects for its protein content. You may have certain insect species in one part of the country that are not present or insignificant elsewhere. Honeybees for example will rarely visit tomato flowers because they favor nectar producing flowers over pollen only flowers such as tomato. If heavy nectar and pollen producers are in bloom, tomatoes will rarely be visited so the level of competing bloom has to be factored in. Distance between plants is important because most pollinators will fly to a flower near the one they are leaving. This results in insects flying down a row of tomatoes instead of flying to another plant several feet away.
Genetic barriers are rarely used by home gardeners. This would be something like a male sterile line that has to be crosspollinated to set seed. This is something a large seed company might do but rarely the home grower. Physical barriers such as bagging flowers, growing in a greenhouse and manually pollinating the flowers, or separating the plants by distances that reduce or prevent crosspollination are among the options available to the homegrower. A temporaral barrier is growing a tomato plant in such a way that there are no other tomatoes in bloom to cross with it. This prevents unwanted crosspollination with a minimum of effort. If you grow a tomato indoors and plant it outside so that it is blooming very early and no other tomatoes are blooming, this is the kind of barrier you have established.
If your garden area does not permit planting tomatoes at least 1/2 mile apart, then some level of crosspollination will occur. Very few pollinators will fly more than ½ mile so this is a fairly effective isolation distance. A key factor is that as distance increases, crosspollination falls off very rapidly. Since most gardeners have only a few hundred square feet, distance is not going to be an effective measure. Bagging flowers is the best alternative. If properly bagged, 100% selfpollination is assured. You can also take the combination approach. Plant tomatoes at least 25 feet apart, preferrably 10 or more plants of the same variety, with competing flowers in between and save seed only when low levels of pollinators are present. This will reduce crosspollination to a minimum.
Which plants should I save seed from?
The best plants with the characteristics you desire to continue make the best seed parents. Carefully check that a variety is true to type before designating as a seed parent.
How do I collect, ferment, and store the seed?
Seed should be collected from tomatoes that have begun to turn from green to ripe. A tomato that is either too ripe or too green is difficult to extract seed from. There is a stage where the fruit is fully colored but still slightly firm which works best for collecting seed. I carry a deep tray with a stack of clear plastic cups, a sharp knife,an old towel, and a permanent marker to the garden. Take one cup from the stack and label it with the marker, then pick a tomato and slice the bottom off. Squeeze the top of the tomato over the cup kind of like milking a cow and most of the seed and gel will be squirted into the cup. DO NOT do this over the tray, sometimes seed go flying like they are jet propelled and could wind up in the wrong container! Continue picking tomatoes, slicing and squeezing until you have as many seed as desired. Then place the cup in the tray and if needed, wipe your hands off with the towel.
The tray should be placed where it won't be subject to strong winds or rain but NOT inside your house unless you just happen to like the smell of fermenting tomatoes. I have a porch behind the house that is protected on 3 sides and has a table to sit the trays on. Depending on temperature, the fermentation will be complete in 3 to 14 days. Its very important NOT to leave the seed in the fermenting cups more than about 2 weeks because the seed lose viability! A thick fungal mat will form on the surface of the pulp in the cups. Once fermentation is complete, I use a clean fork to stir the pulp up then fill the cup with water and pour whatever floats out on the ground. Repeat the fill with water, pour off floating material 3 or 4 times until the seed are mostly clean. Then pour the seed into a stainless strainer and rinse thoroughly under running water while rubbing the seed to separate bits of tomato flesh. You can then put the seed in bleach water to help reduce seedborne diseases. The bleach water should be made with 1 part household bleach with 5 parts water. Don't leave the seed in this more than 2 or 3 minutes! Pour the seed into a clean strainer to eliminate the liquid and then dump the strainer onto a LABELED paper plate. Note that the bleach treatment can be skipped if you prefer in which case just dump the cleaned seed from the first strainer onto the plate.
Tomato seed should be properly dried and then stored in a glass jar or a sealed plastic container such as a ziploc type freezer bag or a plastic bowl with lid. Their viability declines as temperature and moisture increase so they must be protected from extremes. Seed can be stored at room temperature for up to 10 years with high viability. I have some seed that are 15 years old and have been stored at room temp. They still give 50% viability today though they take up to 20 days to germinate.
If you want to store them truly long term (more than 10 years) then you might want to freeze them in a well sealed glass container. The moisture content must be below 8% for freezer storage. You can get pouches of silica gel from pharmacies which can be included in the container to absorb any excess moisture. Plastic or glass vials with tight sealing lids can be easily found on the internet and make excellent containers for long term seed storage.
Will my tomato seed grow? Testing for viability and trueness to type.
Its always a good idea to test seed you have saved to see if an accidental cross has occurred. This would show up if for example, a potato leaf plant had been pollinated by a regular leaf variety. Knowing what percentage of seed will germinate can also help to ensure the approximate quantity of seedlings desired. I start a sample of seed at least 2 weeks before main planting with 20 seed of each saved variety. The seedlings are counted to see how many germinated and then let grow to the first leaf stage to check for crosses. I also keep some of these seedlings for extra early transplants.