A nonprotein substance required for certain enzymes to function. Cofactors can be co-enzymes or metallic ions.