Whales swim and live in the ocean. Yet, they are mammals. They have traits similar to those of mammals that live on land. They give birth to live young, feed their young with milk, and have hair. Evidence from the fossil record supports the theory that the ancestors of whales lived on land before they moved into water. Over time, several body structures, such as the skull, hips, and legs, changed. These changes made the structures better adapted to swimming than walking.