The whale is not a fish. Whales live in the ocean and many people call them whales because they are shaped like fish. Actually, whales are mammals and breathe with their lungs, while fish breathe with their gills.
Whales, also known as cetaceans, are the common name for some of the creatures in the suborder Cetacea, a group of marine mammals. The suborder Hypoceti is further divided into the baleen whale suborder (Mystacoceti) and the toothed whale suborder (Odontoceti). are breathing with their lungs. In everyday language, whales are often separated from dolphins (and freshwater dolphins), but in zoology they belong to the same lineage group.
Whale Evolution:
All infra-whale organisms are descended from the terrestrial animals of the order Artiodactyla, which is biologically classified with the Artiodactyla as belonging to the order Cetacea, to which whales and hippopotamuses belong. Whales also returned to the sea from terrestrial mammals through a process of aquatic adaptation, which occurred around 52-83 million years ago in the Eocene.
Whales, dolphins, and porpoises, all of which belong to the order Artiodactyla, and whose closest blood relative as two-toed hoofed creatures is the hippopotamus, diverged about 40 million years ago, with paleontologists believing that they evolved first from baleen whales to amphibious-living archaeocetes such as the walking whale, and then to whales living exclusively in the water such as the Lobotomus. It diverged into two suborders, toothed whales and baleen whales, 34 million years ago.
Reference: Baidu Encyclopedia-Cetacea