Antibiotics only work against bacterial infections. They can't kill viruses. Antibiotics can be used to treat mild conditions like acne and also the ones that could possibly kill you such as lung infections (pneumonia). They are medications that treat infections but in some cases they also can prevent them(2).
Antibiotics kill or stop the growth of bacteria. Different antibiotics will work in different ways and some might be more effective than the other. There are two main ways to classify bacteria, they can be gram positive (thin, easy permeable, one layered cell walls) or gram negative (thicker, less permeable, two layer cell wall). Antibiotics has to be able to penetrate one or both types of bacteria(1).
There's a few way that antibiotics can work:
- interfere with the bacteria ability to repair their damaged DNA
- unable bacteria to grow new cells
- weakening bacteria's cell wall until it's bust (bacteria's being killed)
References:
(1)http://health.howstuffworks.com/medicine/medication/question88.htm
(2)http://www.nhs.uk/conditions/Antibiotics-penicillins/Pages/Introduction.aspx
(3)http://medicinexplained.blogspot.co.uk/2012/02/gram-staining-procedure-mechanism.html