Marine mammals depend primarily on the water content of the food they eat, rather than on drinking sea water.
Whales, for example, eat mostly shrimp-like krill and fish.
A high percentage of the body tissue of fish is water.
Toothed whales eat larger fish or squid, while the baleen whales, which are larger, take big gulps of sea water and strain the food through the bony baleen structure, an efficient sieve-like mechanism.
As for fish, they absorb water through body surfaces. They have gills and membranes that allow a transfer of water osmotically.
Marine fish must process sea water, which has a higher concentration of salt than fluids within their bodies.
They have semipermeable membranes, which allow water in but keep most of the salt out.
Then the fish must conserve the water they have processed, so they produce a very concentrated urine, expending little water in the waste process.