The fin on the back of whales are called dorsal fins. A dorsal fin is a fin located on the backs of various unrelated marine and freshwater vertebrates, including most fish, cetaceans (whales, dolphins, and porpoises), and the (extinct) ichthyosaurs. Depending on the species, an animal may have one or two of them.
Wildlife biologists often use the distinctive nicks and wear patterns which develop on the dorsal fins of large cetaceans to identify individuals in the field. The main purpose of the dorsal fin is to stabilize the animal against rolling and to assist in sudden turns.