The skin acts as a physical barrier due to its outer layer, the epidermis, which consists of tightly packed cells that prevent pathogens from entering. Additionally, the skin produces antimicrobial substances and has a slightly acidic pH that inhibits the growth of microbes.