Genes and wiring
Genes make the chemical signals that guide the axons to their targets. But the body's instruction manual only contains about 80,000 genes. Even though about half of these may be involved in making and connecting the brain, there aren't enough to specify each of the billions of connections needed. Instead, the signals get the axons to roughly the right place, and the remaining connections form as they are used - both before and after birth.