Azithromycin is used to prevent and treat a very serious type of infection (mycobacteria or MAC). It is a macrolide-type antibiotic. It works by stopping the growth of bacteria.