A selective herbicide works by utilizing specific chemicals that target the metabolism or growth of the target weeds, while leaving other plants unaffected.