Natamycin binds to ergosterol, a building block in the cell walls of yeasts and molds. Ergosterol enables the transport of food across the membrane. When natamycin binds to ergosterol, the transport of nutrients gets blocked and the cell starves to death. Bacteria do not contain ergosterol and are therefore not affected. Natamycin is effective in extremely small quantities (parts per million).