Antibiotics are used to treat or prevent some types of bacterial infections. They're not effective against viral infections, such as the common cold or flu. Antibiotics should only be prescribed to treat health problems: that are not serious but are unlikely to clear up without antibiotics