The dominate trait for goats which is indicated by the capitol P. Horns are the result of two recessive genes which are indicated here by lower case p for horned. You would not be able to tell the difference in a polled animal that carries two dominate genes from one that carries one recessive gene for horned. This explains how it is possible to breed two polled animals and have some offspring that have horns. This indicates that both parents carry a recessive gene for horns.
PP - This animal is polled and does not carry the gene for horns. Pp - This animal would be polled and carry a recessive gene for horns. pp - This animal has horns. An animal must carry two genes for horns to have horns.
Here are the various breeding scenarios with the resulting offspring:
Horned (pp) X Horned (pp) = 100% Horned (pp) Polled (Pp) X Horned (pp) = 50% Polled (pp) and 50% Horned (Pp) Polled (Pp) X Polled (Pp) = 25% Polled (Pp), 50% Polled (Pp) and 25% Horned (PP) Homozygous Polled (PP) X Horned (Pp) = 100% Polled (Pp) Homozygous Polled (PP) X Homozygous Polled (PP) = 100% Homozygous Polled (PP)