The answer is a gene.
During an embryogenesis, cells divide to form tissues and organs. In some moment, a mutation could occur in a gene in some cell. The copies of those genes molecules will be mutant copies and will be present only in that cell line. That is why pigment is absent only in specific places.