system
Given the following post, respond as if you're commenting on Reddit:
human
How do fish in the ocean not get dehydrated?

Humans can't drink salt water because it has so much salt right? So how do fish stay hydrated if they never access to fresh water?
gpt
First, some background.  Water flows from areas where there's not much dissolved (low salinity), to areas where there's a lot of stuff dissolved (high salinity).  This is called osmosis.   Dissolved things (like salt) flow in the opposite direction, from high to low concentration.

Hagfish have blood at the same salinity as seawater, so they don't have to worry about water loss due to osmosis.  

Sharks and stingrays have low concentrations of salt in the body (similar to humans and bony fish), but they have high concentrations of urea and TMAO in the fluids.  The total amount of "stuff" in the fluid is the same as seawater, it's just that most of it is urea instead of salt. So they don't have to worry about water leaving their body.  They _do_have to work to pump out extra salt ions that try to enter their body.

Bony fish have blood that is less salty than seawater (just like humans-this is why if you are stranded on a raft you should try drinking fish blood instead of seawater).  So water is constantly trying to leave their body and salt is constantly trying to get in.  The fish make up for this by drinking water and excreting the extra salt ions out of their kidneys and gills.  You can't just drink seawater because your body isn't good enough at getting rid of the extra salt.  But marine fish are better at pumping out the salt, so they can get their water through seawater (and food) without being dehydrated.  Some land animals (eg, cats) are good enough at excreting surplus salt that they can actually drink seawater without becoming dehydrated.