When something "smells moldy" what are we really smelling?
The vast majority of the things you smell are odorants, or volatile molecules; not spores. They are light compounds that have high vapor pressure (are airborne), and that interact with your chemoreceptors in your nose (can be smelled). The most-often reported microbial volatile organic compounds in living environments according to this study are as follows:


2-Methyl-1-propanol
3-Methyl-1-butanol
3-Methyl-2-butanol
2-Pentanol
3-Octanol
1-Octen-3-ol
2-Octen-1-ol
3-Methylfuran
2-Hexanone
2-Heptanone
3-Octanone
2-Methylisoborneol
2-Isopropyl-3-methoxy-pyrazine
Geosmin
Dimethyl disulphide


Geosmin is probably the most moldy-smelling and is detected very sensitively by olfactory systems of animals that want to avoid contaminated food. To me it smells muddy, or earthy, like soil after a rain shower. In our lab, about half the people find it a pleasant smell. It can be smelled in wine, it's the earthy taste found in vegetables, it's the smell of dead bacteria, and so on and so on. The term petrichor describes the odor and geosmin is a major contributing odorant for this.