In dogs with multicolored coats, white areas have no pigment cells. Black, brown or yellow areas, on the other hand, get their color from special pigment cells.
When a dog is just an embryo, these pigment cells travel from the spinal cord to the rest of the body. A single cell then clones itself in a certain area, forming a group of cells to color the skin and fur there. In a solid black dog, groups of cloned pigment cells fit together like pieces of a jigsaw puzzle to form the black coat.
How do the pieces fit so well?
There's experimental evidence that pigment cells space themselves out equidistantly from each other, then divide and grow to fill the areas in between.
Spotted dogs like Beagles and Fox Terriers, also known as piebalds, have no pigment cells in the white part of their coats. Either some of their pigment cells never developed, or they divided more slowly than usual.
Black and white
Dogs with white just on the feet, tip of the tail and belly have a milder piebald effect. That's because these parts of the body are farthest from the spinal cord and the pigment cells didn't quite get that far. As adults, dogs born with this pattern may lose most of the white, because the pigment cells continue to divide and migrate slowly out to the tips of the toes and tail.
Environmental influences on the embryo like radiation or chemicals can slow the movement of pigment cells and result in spotting. However, as dog breeders know, Spot's spots more likely are determined by Spot's genes.