Most of the time, the tomato is self-fertile. A tomato flower has 5 green sepals, 5 yellow petals partly welded together, 5 stamens (male part) welded together, which hide the pistil (female part). When the flower is mature, at the slightest shake, due to the wind for example, the pollen grains of the anthers (the yellow bags of the stamens) fall on the stigma, upper part of the pistil. Then, if the temperature is sufficient (20°C approximately), they descend in the pistil where the ovules are.
These, fertilized by pollen grains (equivalent to spermatozoa of animals), allow the tomato to develop. Insects are not very interested in tomatoes, which are not very nectariferous, but they sometimes intervene, especially bumblebees, if they do not have other flowers to gather. In the tropics, where the tomato originates, small cousins of the bumblebees frequently intervene and allow different varieties to crossbreed.