How smell works
Humans can distinguish about 10,000 different odors (for comparison, a dog or a rat can distinguish somewhere between 30,000 and 100,000). The details of how we do this were a mystery until the 1990s, and the people who figured it out won the Nobel Prize for it (Richard Axel and Linda Buck, 2004).
Smell can be difficult to describe because it is not easily represented as a spectrum. To appreciate what this means, compare it with hearing or color vision. Any sound that we can hear can be represented as some combination of pitches (frequencies), each at some specified intensity (amplitude), so once you understand how you translate each pitch into a neural signal, you have the whole thing mapped out, at least in principle. For color vision, there are three types of “cones” (the neurons in the retina that detect colors), and any color we can see can be represented as some combination of those three signals. With smell, there is no simple spectrum like frequency of light or sound.
To identify smells, humans have several hundred odorant receptors (the exact number is not clear, but is more than 400 and less than 1000). Each receptor is able to detect a set of odorant molecules that share some structural feature. The mucous membranes inside the nose are studded with receptor neurons. Each of the neurons makes just one receptor molecule. When a neuron “sees” an odorant molecule it recognizes, it gets excited and increases the rate at which is “fires” (sends action potentials down its axon).
The axons (the output cables) of the neurons in the nose travel through little holes in a part of the skull called the cribiform plate and run into the olfactory bulb, which sits at the base of the front of the brain. All the receptor neurons which share the same receptor molecule send their output to one location in the olfactory bulb.
In the olfactory bulb, the receptor neurons contact neurons called mitral cells (a mitre is a bishop’s tall pointy hat, and things in the body that are called “mitral” are called that because they are tall and pointy… the mitral valve in the heart, for instance). These mitral cells can talk to each other through other neurons (called periglomerular and granule cells). The details of what happens here are still not known in detail, but the point is most likely to sharpen the signal to noise ratio of the information flowing through the system.
A side note… in other mammals, there is a separate system of smell that exists alongside the main one, and is responsible for processing pheromones. There is a special organ in the nose called the vomeronasal organ, and a separate area of the olfactory bulb where the receptor neurons in the vomeronasal organ send their output, etc. While there is some evidence that something like pheromone signaling exists in humans, it probably does not work through a separate system and has far less impact on human thought and behavior than it does in other animals. In other words, those “pheromone colognes” are almost certainly a waste of money.
From the olfactory bulb, information flows to a part of the brain called the piriform cortext, and from there it goes all over the place. One prominent connection that deserves note is between the piriform cortex and the hippocampus – the seat of memory. This explains why smells can trigger memories so quickly and sharply.