Dr. James Murray was reading Rudyard Kipling’s classic fable “How the Leopard Got Its Spots” to his daughter, when he began to wonder why some animals have spots and some have stripes. Some animals even have both stripes and spots, on different parts of their bodies.
Alan Turing was the first to think about how the coat patterns of animals such as leopards and zebras were designed. He found that the skin coloration is determined during the early development of the embryo, and the shape of the embryo is what determines whether the animal will have stripes or spots. Long and skinny parts get stripes, while short and chubby parts get spots. You can read about Turing's theory here, at the bottom of the page.