Your mouth and nose is basically connected, and example you smell something and its spicy, right? So when you taste it, it's just as spicy as it smelt. I hope that answered your question :/
Smell and taste are closely linked. The taste buds of the tongue identify taste, and the nerves in the nose identify smell. Both sensations are communicated to the brain, which integrates the information so that flavors can be recognized and appreciated.