Actually these are self pollenized (or self fertile), but they need help to pollinate, so they are not truly self pollinated.
With tomatoes, you can look at the flower. Some tomatoes have an exerted stigma, which is out in plain view. If so, the chances that it will cross with nearby blooming varieties is fairly high. If the stigma is hidden deep inside, it is much less likely to have a bee brush off pollen onto it. Bees buzz pollinate tomatoes, peppers, and others in that family. This means they hang on the flower and vibrate their wing muscles, releasing a cloud of pollen. Some of this can stick to the stigma on the way by; some can strike the bee's "belly" and bounce back onto the stigma. Lettuce and many other garden plants cross freely. With vine crops, you can select a female flower before it opens, and bag it. Then hand pollinate it from a male blossom of the same variety, then rebag it with a label. The fruit that develops can then give you seed that will run true to variety.