Antibiotics are prescribed for bacterial infections such as pneumonia, urinary tract infections (UTIs), and skin infections. They are not effective against viral infections like the common cold or the flu. A healthcare provider typically prescribes antibiotics after diagnosing a bacterial infection.