You have to determine which flowers are male, which female, which is usually an easy thing to do, but which is to long and boring to list here as there are 70+ major types of vegetables grown just in the US The male flower produces the pollen, the female flower usually has a bulbous area (the embryo which will turn into the fruit or vegetable) at the bottom of the flower. There are family groups in the vegetable world, and pollination is basically the same along family lines. Also, plants usually have both types of flowers on them, male and female, though it is still good to pollinate each plant from a different plant so to insure some genetic diversity.
To help in pollination, like in the case of corn, you snap off a pollen rich tassel and shake it over the silk coming out of the ears. In the case of squash you find a freshly bloomed male flower, pick it, go over and find a female flower and rub the two important parts together. Lettuce is easy as the flowers are hermaphrodites, and small, so they just have sex freely and you don't have to get involved too much. With tomatoes, you usually just have to shake the plant, but even this is usually not necessary (they get the job done on their own, like lettuce).
You know how corn has that beautiful silk coming out the top of the ear? If you followed each single strand of silk back into the ear, you will find that it is attached to a single kernel of corn. So, all the kernels of corn have their own strand of silk. The silk is there to catch the pollen blowing around in the outside world. Fresh pollen, coming from the tassels, falls on a single strand of silk. The pollen, sitting on the silk, sends down a pollen tube (I think that's what it is called) down the strand of silk to the kernel of corn, and the kernel is fertilized. The kernel (seed embryo) starts to swell and grow - the result is the fresh corn we eat and corn meal. Now, you know how when you open up a fresh ear of corn and some of the kernels are missing? This happens because pollen did not fall on the particular silk that was attached to that kernel, so it did not grow.