It's known that humans have about 10 cm2 of olfactory epithelium, with roughly 5 million sensory neurons.
Smells are detected due to the activation of neurons by airborne volatile chemicals and particles. Different chemicals affect different groups of neurons, which, after cerebral processing, lead to the impression of 'smell'.
The exact neuro-processing mechanism is still unclear.
Since any one receptor is responsive to various odorants, and there is a great deal of convergence at the level of the olfactory bulb, it may seem strange that human beings are able to distinguish so many different odors. It seems that a highly complex form of processing must be occurring; however, as it can be shown that, while many neurons in the olfactory bulb (and even the pyriform cortex and amygdala) are responsive to many different odors, half the neurons in the orbitofrontal cortex are responsive to only one odor, and the rest to only a few.
It has been shown through microelectrode studies that each individual odor gives a particular spatial map of excitation in the olfactory bulb. It is possible that the brain is able to distinguish specific odors through spatial encoding, but temporal coding must also be taken into account. Over time, the spatial maps change, even for one particular odor, and the brain must be able to process these details as well.
Source : Wikipedia
There are currently two main theories regarding how the olfaction mechanism might be working :
The Docking theory (1949) - which proposes that airborne molecules 'dock' with protein odorants in weak non-covalent interactions. (see Wikipedia)
The Vibration theory (1928) - proposes that a molecule's smell character is due to its vibrational frequency in the infrared range. (see Wikipedia)
Both theories have aspects which appear to explain some experimental (and experiential) results - and at the same time fail to explain others.
Also unclear is the number of odours which humans can differentiate. The current estimates are in the region of 1 Trillion, but the figures are currently under dispute. See : The number of olfactory stimuli that humans can discriminate is still unknown eLife. 2015; 4: e08127.
Also see : Tasteplugin-autotooltip__plain plugin-autotooltip_bigTaste
Current theory lists five main taste receptor categories : sweetness, bitterness, sourness, saltiness, and umami. Source : Wikipedia
The physical mechanisms for detection of each of these main flavour types have been extensively investigated, and the corresponding tongue 'receptors' have (mostly) been identified. and Odorousness of chemical compoundsplugin-autotooltip__plain plugin-autotooltip_bigOdorousness of chemical compounds
"In studies of vision and audition, stimuli can be chosen to span the visible or audible spectrum; in olfaction, the axes and boundaries defining the analogous odorous space are unknown. As a result, the population of olfactory space is likewise unknown, and anecdotal estimates of 10,000 odorants have endured."