While we can smell more than 10,000 different smells and have hundreds of olfactory receptors, rodents have thousands of olfactory receptors. So how exactly does smell work? Let's start with some basic anatomy and physiology involved in olfaction, which is the sense of smell. Just as your nervous system uses neurons to function, smell also has specialized neurons for smell called olfactory cells. The special cells line the back of your nasal passages and have tiny threadlike hairs called, cilia. If the olfactory receptor is stimulated an impulse will be sent.
The cilia will then send the impulse (smell) to the olfactory bulb, which then sends it to certain areas in the brain. The brain is then left to interpret the pattern of the molecules or odorants as a specific odor. This takes place in the olfactory area in the cerebral cortex.
While this explains how we are able to associate a certain chemical trace with a "smell", why is it that certain smells bring back memories? A certain breezy perfume may bring to memory a day at the beach or a certain musty smell may remind you of days spent at grandmas.
Well as the olfactory bulb sends the odorants to the cerebral cortex, it also sends it to other parts such as the hippocampus, hypothalamus and the amygdala. These structures (including the olfactory bulbs) are part of the limbic system, which deal with memory and emotional behavior.
The reason smells can trigger a memory is because when you first encounter a new odor you connect it to a certain moment, person, or place unconsciously. For example, if you were to smell minty scent while eating a candy can you would associate a candy cane with the smell of mint. The next time you get a whiff of mint you will (probably) remember that moment and how you felt. So why is it that not everyone likes the same smells? It is because everyone has a different memory and mood attached to different scents; what may have made you happy while smelling mint may have given someone a headache.
I hope this clarified how olfaction occurs, happy smelling!
References:
Kalat, J. (2012). Biological Psychology. Cengage Learning.
http://health.howstuffworks.com/mental-health/human-nature/perception/smell.htm
http://www.bbc.com/future/story/20120312-why-can-smells-unlock-memories
http://www.bbc.com/future/story/20120312-why-can-smells-unlock-memories