Saltwater fish die in freshwater due to overhydration, and freshwater fish die in saltwater due to dehydration. This seems to make little sense, given that a fish surrounded by water shouldn't die from a lack of water, but due to the physiology of a fish's skin and the natural properties of water, each type of fish is suited to their fresh or salty habitat, but no other.
A Sort of Barrier
To understand why saltwater fish die when placed into freshwater, we first need to understand the structure of their cells. Fish cells are semi-permeable: Some elements can pass through them, while others cannot. In the case of our finned friends, water can move back and forth through the cellular membrane, but dissolved salt in the water is too big for the membrane, and won't pass through.
The next piece in this aquatic puzzle is a chemical process known as osmosis. During osmosis water naturally moves from lower concentrations of a substance -- in this case salt -- into higher concentrations of that substance. The water in saltwater fish is continuously pulled out of their bodies into the surrounding water because their bodily fluids have lower concentrations of salt.
It's important to note that all fish require some level of salt in their bodies to be healthy, but like humans, too much or too little can make them sick. To counteract the fact that freshwater is always moving from their bodies through osmosis, saltwater fish drink constantly. Their kidneys process and retain water, then expel the remains -- mostly salt -- in very small amounts of urine.
Now that we know what happens to the body of a saltwater fish when in saltwater, we can further explore why freshwater would then be lethal. Because the saltwater fish has saltwater physiologically, he'll be drinking the freshwater around him. However, unlike the saltwater he's adapted to, the freshwater won't be pulling water from his body. Why? Recall the way osmosis works: lower concentrations to higher concentrations. Now, instead of out, the water will be moving into the comparatively higher salt concentrations of the fish's bodily fluids.
Combine constant drinking, water moving into the body of the fish and the overworking of the kidneys to retain water the fish doesn't need: The saltwater fish becomes overhydrated. During overhydration -- also known as water intoxication -- important electrolytes in the fish are pushed outside of livable limits, and the fish dies.
Taking this one step further, a freshwater fish placed in saltwater has the opposite problem. His kidneys have adapted to expelling extra water, not retaining it. With osmosis causing water to leave his body plus the urine output from his kidneys, a freshwater fish becomes desiccated and dies from dehydration.
Season to Taste
The salt levels in your home aquarium are referred to as the "salinity" of your tank. The salinity is key when it comes to happy and healthy fish, and varying levels above or below what a saltwater fish is used to can cause stress, and then death. Pay close attention to evaporation, and use a hydrometer to track the ratio of saltwater to pure water.