Most animals have the capability to swim, but many never develop skills and must be taught, while very few species are simply not capable of swimming. People, apes and other primates are among the animals that must be taught how to swim because it does not come to them at birth.
For a mammal to be able to swim, its nose must stay above water. Most mammals that are somewhat accustomed to the water have developed faces and noses that are able to stay above water when floating. They are also more buoyant in the water, which allows their noses to stay above the water and in the air while they are swimming.
Humans and other primates do not have faces that are developed for breathing in the water. They must work to keep their heads up and out of the water while they are swimming in order to be able to breathe. Some humans are able to hold their breath for long periods of time, which allows them to swim underwater without the need for taking constant breaths. It is important to note that while humans are not born with the ability to swim, they are able to learn the skill and able to swim for long distances when trained properly.