Antibiotics are prescribed to treat bacterial infections such as urinary tract infections (UTIs), bacterial vaginosis, and pelvic inflammatory disease (PID). It is crucial to complete the entire course of antibiotics to ensure the infection is fully eradicated and to prevent antibiotic resistance.