The chemical reactions and pathways involving small molecules, any low molecular weight, monomeric, non-encoded molecule.