Metabolites have various functions, including fuel, structure, signaling, stimulatory and inhibitory effects on enzymes, catalytic activity of their own (usually as a cofactor to an enzyme), defense, and interactions with other organisms (e.g. pigments, odorants, and pheromones).
A primary metabolite is directly involved in normal "growth", development, and reproduction.
Ethylene exemplifies a primary metabolite produced large-scale by industrial microbiology.
A secondary metabolite is not directly involved in those processes, but usually has an important ecological function.
Understanding how pharmaceutical compounds are metabolized and the potential side effects of their metabolites is an important part of drug discovery.