Coastal
Cetaceans such as the gray whale and bottlenose dolphin live close to the land where the water is shallow and food usually relatively abundant. Gray whales migrate enormous distances between feeding and breeding grounds but some coastal species remain in the same small area of habitat their whole lives. For example the Hector's dolphins of New Zealand are limited to four discrete populations around the two islands and seem unwilling even to cross other habitats
Continental Shelf
The continental shelf is the margin around land before you get to the very deep ocean. The water isn't as shallow as coastal regions. This is the favored habitat of species such as the long-beaked common dolphin.
Open Ocean
Open ocean dolphins and whales such as the sperm whale and Fraser's dolphin rarely venture near the shore. Many other species are semi-oceanic, spending some of their time in the open ocean and some of the time in coastal areas. Migratory whales such as humpbacks travel hundreds of miles every year.
Rivers
Some ocean whales and dolphins venture into rivers and estuaries but four species of dolphin live in the great rivers of Asia and South America permanently. These are the Ganges, Amazon and Indus river dolphins and the estuary dwelling La Plata dolphin. There was a fifth, the Yangtze river dolphin or baiji. The baiji has been declared functionally extinct, although there may be a handful of individuals surviving. The water in such habitats is filled with sediment and low visibility is very low. As a result, the river dolphins have poor eyesight and rely mainly on echolocation to navigate.
Polar Seas
Near the ice caps, whales need to be adapted to the very cold conditions and the difficulties of rising for air because of the ice sheets. Many species of whales visit this habitat to feed in the summer, before migrating south or north in the fall. Three species live in the Arctic seas all year round: belugas, narwhals and bowhead whales. These whales have exceptionally thick layers of blubber to insulate them from the freezing ocean.