Topical antibiotics like clindamycin work by reducing the number of bacteria that cause acne. The medication also has anti-inflammatory effects that help pimples become less red and swollen.