This site will help you gain an understanding of antibiotics, but in order to understand how they work you must first understand some basic information on bacteria, viruses, and your body's immune response. Bacteria are prokaryotic (do not contain a nucleus) single cellular organisms. The reason you may feel side effects from a bacterial infection is because of enzymes released by the bacteria to conform your body to a more comfortable environment for them as well as the side effects your body's immune response. 

Immune Response-

Blood Flow: Body increases blood flow which causes an increase in white blood cells to the affected area. 

Heat: Increased bloodflow leads to an increase in heat in the area. Also your body will increase the heat by triggering a fever to make your body a less comfortable enviornment for bacteria.  

Inflammation: increased blood flow and heat causes inflammation

Production of Mucous: your body will produce more mucous to trap bacteria and other pathogens from entering the body and attempt to expel them in the mucous.

Helpful Links

U.S. Center for Disease Control
National Institute of Health
World Health Organization
Food and Drug Administration