The mechanism of action varies depending on the type of antimicrobial agent. Antibiotics, for example, may work by disrupting the bacterial cell wall, inhibiting protein synthesis, or interfering with DNA replication. Antivirals might block the replication cycle of viruses, while antifungals target the cell membrane or wall of fungi.