Topical antibiotics work by inhibiting the growth of bacteria on the skin's surface. They achieve this through various mechanisms, such as inhibiting cell wall synthesis or disrupting protein production within the bacterial cell. This localized application ensures higher concentrations at the infection site with minimal systemic effects.