salamander is right about triclosan being the active ingredient in antibacterial soap, but the reason why it doesn't kill human cells doesn't have anything to do with the skin. From salamander's same source:
Once they are in microbes cells, triclosan poisons a specific enzyme (enzymes are proteins that have particular functions, think of them as cellular machinery) that is used in making microbes cell membranes. Humans dont have this enzyme, so triclosan doesnt poison us.
The enzyme in question is called Enoyl-acyl carrier protein reductase (ENR), and is used by bacteria as part of their fatty acid synthesis. Eukaryotes use a different set of enzymes for fatty acid synthesis, so we aren't effected by this activity of triclosan.
For some more specifics about the interaction of triclosan and ENR, we can turn a study about the antibacterial mechanism of triclosan that was done soon after triclosan was first crystalized in situ with its target enzyme.
From Heath, et al (1999):
Triclosan is a broad-spectrum antibacterial agent that inhibits bacterial fatty acid synthesis at the enoyl-acyl carrier protein reductase (FabI) step... The ubiquitous occurrence of type II fatty acid synthase systems in bacteria and the essential nature of the FabI reaction make this enzyme an attractive target for antibacterial drugs. Accordingly, triclosan is effective against a broad spectrum of bacteria, including multi-drug-resistant Staphylococcus aureus.