Antimicrobial agents work by targeting specific parts of the pathogen's structure or life cycle. For instance, antibiotics may inhibit bacterial cell wall synthesis, protein synthesis, nucleic acid synthesis, or other vital processes. Antivirals often aim to block viral replication. The effectiveness depends on the pathogen's susceptibility to the drug and the patient's immune response.