Freshwater fishes tend to have much higher concentrations of ions (like sodium) in their blood compared with the concentrations in the water. Their bodies are designed to expel large volumes of very dilute urine frequently. This works to their advantage in a freshwater environment because they are surrounded by water with low salt concentrations. So, just pee a lot and hang onto what little salts you have. They also have specialized cells in their gills to allow them to directly take up sodium and chloride from the water to fine-tune the salt balance in their blood and cells.
Saltwater fishes face the opposite problem. They need to maintain salt concentrations in their blood that are much lower than the surrounding environment. To do this, they actively drink water and form a highly-concentrated urine to expel the excess salts. They also actively expel salts at their gills.
So the basic freshwater strategy is to pee like hell and absorb salt. The basic saltwater strategy is to drink and hold it so they can absorb as much of the water (while leaving behind the salts) as possible. Put either of these fishes in the opposite environment, and these critical systems fail to function. The "pee like hell" strategy will quickly deplete cells of water in a saltwater environment, while the "drink and hold it" strategy will completely water-log them. These salt concentrations are critical to many bodily functions. Just think about what happens to people when they get dehydrated or, in some cases, drink TOO MUCH water. They are at real risk of death. Same for these fish.
What about things like salmon? Or sharks?
Many salmon and their relatives live in both fresh and saltwater at different points in their lives. Pacific salmon (e.g., Chinook salmon) are born in freshwater. They have nice, normal freshwater adaptations. However, when they reach a certain age and are ready to leave their rivers, they go through dramatic physical transformations during which they develop the necessary adaptations to live in a marine environment. When they are old enough, and are ready to breed in freshwater as adults, they undergo yet another transformation. This, and the energy required to to migrate and produce eggs/sperm, exacts such a toll on the fish that they almost always die immediately after spawning. Moving between fresh and saltwater is not easy.
What about sharks, like bullsharks? How do they move between fresh and saltwater? Sharks are very different from what people normally call "fish". They also have a completely different strategy for surviving in saltwater, which will inform us about how some survive in freshwater. Rather than deal with the threat of constant water loss by drinking saltwater and excreting the extra salt, a shark's blood is filled with urea (a nitrogen-based compound that makes your pee stink [EDIT: the stink is actually from the urea decomposing into ammonia; urea is odorless on its own]). In fact, they store so much of it that their blood ion concentrations are actually close to that of sea water. Sharks that can spend time in freshwater are able to expel excess urea (which is just a metabolic waste product, hence why it's in your pee) rather than retain it in their blood. This allows them to adjust the levels of dissolved ions in their blood so that they can flexibly move between salt and freshwaters.
Now, this doesn't cover everything (there are 25,000+ fish species), but hopefully it gives a more complete overview...