Since some insects eat very specific plants or prey, they must have a way to distinguish one taste from another. How does an insect taste its food?
An insect's ability to taste works in much the same way it is able to smell. Special chemoreceptors trap chemical molecules. The chemical molecules are then moved and placed in contact with a dendrite, a branching projection from a neuron. When the chemical molecule contacts a neuron, it causes a depolarization of the neuron membrane, and thus an electrical impulse that can travel through the nervous system. The insect brain can then direct the muscles to take appropriate action – extend a proboscis and drink this nectar, for example.
The real difference between an insect's sense of smell and sense of taste lies in the form of the chemical it is collecting. If the chemical molecules occur in gaseous form, traveling through the air to reach the insect, then we say the insect is smelling this chemical. When the chemical is present in a solid or liquid form, and comes in direct contact with the insect, the insect is said to be tasting the molecules. An insect's sense of taste is referred to as contact chemoreception, or gustatory chemoreception.
Taste receptors are thick-walled hairs or pegs with a single pore through which chemical molecules can enter. These chemoreceptors, also called uniporous sensilla, usually occur on the mouthparts, since that's the part of the body involved with feeding.
Like any rule, there are exceptions, and certain insects have taste buds in odd places. Some female insects have taste receptors on their ovipositors, so they can taste a plant or other substance to determine if it is a suitable place to lay its eggs. Butterflies have taste receptors on their feet (or tarsi), so they can sample any substrate they land on just by walking on it. Flies, too, taste with their feet, and will reflexively extend their mouthparts if they land on anything edible. Honey bees and some wasps can taste with receptors on the tips of their antennae.