The Lock and Key Model
Each molecule has a specific shape and size. In the lock and key model, a molecule "fits" into certain receptors in your nose. If the molecule fits inside a "sweet" receptor it will smell sweet, but if it fits into a "stink" receptor you'll turn your nose up to it. A great example of this is carvone - an organic compound that reacts to the receptors in your nose in a very interesting way.
Carvone comes in two different shapes (called enantiomers): R-Carvone and S-Carvone. The two molecules are exact in almost every single way, except that they are mirror images of each other. The interesting thing is that R-Carvone smells like spearmint while S-Carvone smells like caraway. The fact that your brain interprets these two chemicals (which are very similar) so differently is strong evidence that the receptors in our noses work according to the lock and key model - a different shape gives a different smell.
The Swipe Card Model
A second proposed model for how these receptors work is the "swipe card model. In this model the shape is still important, but the information is carried in some other way (just fitting in the receptor isn't enough). This model gets its name from a credit card machine - your card needs to fit into the machine, but the information on the magnetic strip is what's important.
Dr. Luca Turin et al. have presented some new results that give compelling evidence for the swipe card method. To test the model they took large molecules with a distinct musky smell and swapped all the hydrogens for deuterium (a heavy form of hydrogen). Participants were given four vials (three containing the original molecule and one containing the deuterated molecule) and asked to separate them by smell - an identification they were able to make correctly 90% of the time! The "lock and key" model would predict that the smells would be no different, but the "swipe card" correctly predicts that the molecules would smell different, since the two have very different bond vibrations.
Previous evidence
This isn't the first evidence to support the "swipe card" model. Late November 2012 an article was published by A. Marshall Stoneham et al. giving other errors in the "lock and key" model. An interesting example is ferrocene and nickelocene. These two molecules are roughly the same size and shape, but have very different smells. Ferrocene (on the left) is a spicy smelling chemical while nickelocene (on the right) smells like an oily organic compound.
Notes
Previous evidence
This isn't the first evidence to support the "swipe card" model. Late November 2012 an article was published by A. Marshall Stoneham et al. giving other errors in the "lock and key" model. An interesting example is ferrocene and nickelocene. These two molecules are roughly the same size and shape, but have very different smells. Ferrocene (on the left) is a spicy smelling chemical while nickelocene (on the right) smells like an oily organic compound.

The model breaks down in the opposite direction as well. If two compounds smell the same they should be expected to be the same shape (according to the "lock and key" model). However, in the same paper cited above it has been shown that molecules with very different shapes can have the same smell if their vibrational frequencies are similar. This is the case with hydrogen sulfide (on the left) and decaborane (on the right). The two compounds are obviously very different in both size and shape, but they both activate at least one of the same receptors. This can be explained by the "swipe card" model, since they have very similar vibrational frequencies.

It is important to note that neither of the above mentioned models are correct. In fact, every model we could give would be just that: a model. I should also mention that this is still an open topic of research and there are obvious flaws and benefits to each model. I just think it's amazing that something that many people take for granted - the sense of smell - could be such an interesting scientific problem.
[1] In the scientific literature you'll most likely see the "induced fit" model is more accepted than the "lock and key". In the "induced fit" model the receptor molds itself around the binding molecule (thus the binding molecule induces the correct fit). In this article I will be using "lock and key" to describe both models, though, since both are only specific to size and shape.