Fish were the first animals to have vertebrae, about 510 million years ago. Vertebrae are tiny O-shaped bones that go around the fish’s spinal cord and protect it so it won’t get broken.
Because there are lots of tiny vertebrae, the fish can protect its spinal cord and still be able to move flexibly, in order to swim. Fish made these first vertebrae out of cartilage. Some fish, like sharks, still have cartilage vertebrae instead of bone.
After a while, fish evolved to make their vertebrae out of bone instead of cartilage. Bone vertebrae were stronger. Big fish have more vertebrae than small ones. Some trout have about sixty vertebrae.
Once fish had developed vertebrae, most of the later animals that developed from fish kept their vertebrae. So frogs, snakes, dinosaurs, birds, elephants, dogs and people all have vertebrae.
Bibliography and further reading about bones: