The fossil record also includes a number of extinct fishes with different types of bony body armor. That suggests that once structures like conodont teeth arose, a mutation in their body plan, or Hox genes, causes the tooth-like elements to appear in other parts of the body. The same process is believed to have occurred when the ancestors of mammals first evolved whiskers to help them feel their way around in the dark, but later the whiskers appeared on other parts of the body and began serving as insulation. That may be one reason why nerve cells continue to be associated with hair, even though they no longer function as sensory organs in places such as the underarm. The body armor of the fishes protected them from predators, but it also make them sluggish swimmers. Then came the placoderms, which have a more flexible, unarmored body but the head is still covered by protective bony plates. The placoderms were the first fish that evolved jaws. The placoderms were not true vertebrates because their notochord was only protected by "Y shaped spines that developed above and below it". Therefore we see the first appearance of the precursor to the vertebral columns in a fish that had bony armored plates on the head and jaws. The fish had the genes that instruct tissue to make bone and also had found it advantageous to protect its notochord with bony structure. From there, further mutations and natural selection can then act on these animals until a better way to protect the notochord evolved. The Y shaped spines turned into a complete protective cover, with articulated joints, around the notochord. Indeed, the placoderms were the likely ancestor of all animals with a vertebral column, including sharks, the lobe-finned fishes (which are ancestral to all land vertebrates), as well as the ray-finned fishes, which are the dominant group of fish alive.
To summarize, evolution makes use of chance mutations and existing structures and improves upon them step by step, and each step is an adaptation that is favored by evolution. Further changes are not random, because mutations that render the existing adaptive feature less adaptative will be eliminated by natural selection. Only improvements are allowed. There is no grand scheme or plan to evolve a vertebral column or bones but once a mutation arises, and it is advantageous, evolution tinkers with it to make it even more useful through experimentation and natural selection, while eliminating those changes that are deleterious.