Antibiotics blocks the biochemical pathways which are responsible for the functioning of the bacteria. For example, penicillin blocks the pathway responsible for the making of the cell wall. As a result, the growing bacterial cell is not able to make cell wall and dies off easily.
The human cell on the other hand is devoid of cell wall and as such is not affected by penicillin.