Salmon and several other kinds of fish swim upstream every year from the ocean to freshwater stream banks to lay their eggs. But most fish would die if they moved back and forth like that. Water flows through fishes' mouths and over their gills, and it also flows in and out of their bodies. For a saltwater fish, the liquid in its body is less salty than the water it swims in. So, the water inside the fish moves out through the fish's skin to the saltwater.
Saltwater fish drink enormous amounts of water to keep from drying out.
The opposite happens to freshwater fish. Liquids inside freshwater fish are saltier than the water around them, so the fish absorb a lot of water. Salmon, though, belong to a special group of fish called anadromic fish, which means that they live in salt water, but return to fresh water to spawn. As salmon move from saltwater to freshwater, they gain weight as their sea-salty bodies soak up the fresh water.