There are only seven different types of true tastes—sour, sweet, salty, bitter, savory (also known as umami), fat and carbonation (a subset of sour). Each of these types of receptors bind to a specific structure of a "taste" molecule. For example, sweet receptors recognize hydroxyl groups (OH) in sugars; sour receptors respond to acids (H+); salt receptors react to the metal ions in salts (such as the Na+ in table salt); umami receptors respond to glutamate molecules; and bitter receptors are triggered by alkaloids.*
Alkaloids are nitrogen-containing bases with complex ring structures which have significant physiological activity. Some examples of alkaloids are nicotine, quinine, morphine, strychnine, and reserpine. Many poisons are alkaloids, and the presence of receptors for the bitter taste at the back of the tongue may help to trigger the vomiting response.
Approximately 80–90% of what we perceive as "taste" is in fact due to our sense of smell (think about how dull food tastes when you have a head cold or a stuffy nose). At the beginning of this experiment you may not be able to tell the specific flavor of the candy beyond a general sensation of sweetness or sourness. Over time, you may notice that as the candy dissolves, you can identify the specific taste. This is because some scent molecules volatilize and travel up to your olfactory organ through a kind of back door—that is, up a passage at the back of your throat and to your nose. Since we can only taste a few different true tastes, it's actually smell that lets us experience the complex, mouthwatering flavors we associate with our favorite foods.
*Scientists now believe that other receptors on your tongue bind to long-chain fatty acids as well.