It depends on the antibiotic. Ibuprofen is generally fine alongside most common antibiotics like amoxicillin, but MedlinePlus lists NSAIDs (including ibuprofen) as a possible interaction with fluoroquinolone antibiotics such as ciprofloxacin and levofloxacin — so check which antibiotic you are on with your pharmacist first.
The answer depends on which antibiotic you mean. For most everyday antibiotics, the penicillins such as amoxicillin, ibuprofen is not on the NHS list of medicines flagged to check before combining (that list highlights warfarin, methotrexate, gout medicines, and other antibiotics), and paracetamol or ibuprofen are commonly used to bring down a fever during an infection. The clearest documented exception is the fluoroquinolone class: MedlinePlus states that nonsteroidal anti-inflammatory drugs (NSAIDs) such as ibuprofen (Advil, Motrin) and naproxen (Aleve) may interact with ciprofloxacin and with levofloxacin, and both drugs already carry warnings that they may affect the brain or nervous system and increase the risk of tendinitis or tendon rupture. Because ibuprofen is a separate drug class from antibiotics (an NSAID painkiller), the concern is not duplicate dosing but this class-specific interaction, so the safe move is to confirm the exact name of your antibiotic before reaching for ibuprofen.
Read your antibiotic's name on the label or leaflet. If it ends in "-floxacin" (ciprofloxacin, levofloxacin, moxifloxacin, ofloxacin), MedlinePlus advises discussing it with your doctor or pharmacist before starting ibuprofen or other NSAIDs — and to report seizures, tremors, severe dizziness, confusion, hallucinations, or tendon pain/swelling right away, as these are recognized fluoroquinolone nervous-system and tendon warnings that can appear even after the first dose. With most other antibiotics, ibuprofen is generally fine if you stick to the label dose (typically up to 1,200 mg per day over-the-counter for adults, the lowest dose for the shortest time), but it still isn't right for everyone: people with stomach ulcers or a history of GI bleeding, kidney disease, heart failure, uncontrolled high blood pressure, asthma worsened by NSAIDs, those who are pregnant, or anyone on blood thinners (such as warfarin) or steroids should check first. If you would rather avoid the NSAID question entirely, paracetamol (acetaminophen) is an alternative painkiller — though note it is not automatically interaction-free either (the NHS flags the antibiotic flucloxacillin as a possible interaction with paracetamol), so the safest step is to ask the pharmacist who filled your prescription about your specific pairing.
This is general reference, not medical advice, and not a guarantee of safety. Interactions depend on your doses, health conditions, and other medicines. Always confirm with your pharmacist or doctor before combining products, and follow the dosing on each label.