One of the most compelling pieces of evidence for evolution comes in the form of transitional fossils—that is, fossils that show intermediate stages in the evolution of modern organisms. Whales are awesome, and their fossil record shows a clear progression of forms from land-dwelling ancestors to the marine forms familiar to us today.
Modern whales, or cetaceans, can be subdivided into toothed whales (like dolphins and orcas) and baleen whales (like humpbacks). Whales are mammals, and like all other mammals, they produce milk for their young and breathe air. Most mammals also have hair, and although some cetaceans have hair, some have lost it over evolutionary time. So, how did mammals with adaptations for living on land invade the seas and ultimately evolve into whales?
One of the earliest known fossil whales is called Pakicetus, and comes from the middle Eocene epoch (about 50 million years ago). We're calling Pakicetus a fossil whale, but superficially, it didn't look anything like what you think of as a modern whale. This carnivorous mammal walked on four legs, had a long tail, and was about the size of a wolf. However, when paleontologists started looking more closely at Pakicetus they realized that the inner ear bones of this mammal share some similarities with the inner ears of modern whales, which are adapted to hearing under water. In fact, Pakicetus also had its eyes on top of its head, which is common in species that like to submerge themselves in water and look up. The isotopes in the bones and teeth of Pakicetus tell scientists that this animal was probably living in an aquatic habitat, perhaps wading in shallow water (Thewissen et al., 2009). Although Pakicetus had a lot of traits that suggest it was a transitional form on the way to modern whales, it also has many traits that link it to artiodactyls—even-toed hoofed mammals, including hippos, pigs, cows, camels, and deer. In fact, DNA evidence confirms that artiodactyls are the closest living relatives to cetaceans.
Ambulocetus is another transitional whale fossil, but unlike Pakicetus, shows evidence of greater commitment to an aquatic lifestyle. Ambulocetus was larger than Pakicetus, and had paddle-like feet and a large, muscular tail; it probably used its hind limbs and tail for propulsion in water. Remingtonocetus also had a very large tail, and may have only needed its limbs for steering. Importantly, this early whale probably had an even more advanced form of underwater hearing than either Pakicetus or Ambulocetus.
All the transitional forms we've talked about so far are known primarily from India and Pakistan, and were probably somewhat localized. Our next group of transitional fossils, the ptotocetids, achieved a more widespread distribution because they were able to swim efficiently through the oceans. In terrestrial mammals, the pelvis (hip bones) are connected to the spine. This setup is great for moving on land, but if you want to be a superstar swimmer, it's better to have your pelvis and spine separated, because it allows for better propulsion. Maybe that's how Michael Phelps does it. Protocetids had a separated pelvis and spine, hence their ability to go global. They also had nostrils on the top of their heads, making it easier to get air. But, in spite of looking more and more like modern whales, their ankle bones were still similar to their hoofed relatives, and at least some protocetids could probably still come out on land.
Finally, about 41 million years ago, yet another ancient whale had come into the picture, and these, called basilosaurids, were the first completely aquatic whales. They had blowholes on the top of their heads, flippers, and hind limbs that would have been too small to support them on land. Several more million years of whale evolution would pass before the first real toothed and baleen whales appeared, but by the basilosaurids, the land to water transition was compete.