In simple terms, the tomato flower contains both the anther and stigma - the male and female organs. It only requires some sort of movement of the flower - a foraging insect, a flick with the fingers, etc - to trigger the release of the pollen from the anther. If sufficient pollen is taken up by the stigma, you have fruit. If insufficient pollen is taken up by the stigma, or pollen isn't released by the anther, the flower doesn't produce fruit and will eventually shrivel up and drop.
Tom plants of different varieties adjacent to each other can cross-pollinate but the cross will only reveal itself in the next generation - ie, if you were to save seeds from the fruit that results from the cross this season and plant them next season. This season's fruit will be the variety you planted. It's the seeds inside that are crossed.
It's very hard to tell varieties apart in the early stages unless they are different leaf shapes - eg, potato leaf as against regular leaf. It's sometimes easier to differentiate between them later if you're familiar with growth habits, etc.