If you were just slurping it right out of the sea, you’d be doomed. The salt content in seawater is so high that your body simply can’t handle it – to expel it, you have to produce more urine than what you drank. That, obviously, means dehydration and certain death.
Whatever you do, do not boil the water and then drink it. That will only accelerate your death, as it actually increases the salt concentration.
However, it is possible to desalinate saltwater, provided you have the right equipment on the island with you. The method to do this is called distillation, and can also be used to make human urine potable.
The simplest, easiest-to-do-in-the-wild method is pictured above. The main thing you need is two empty glass bottles, and a heat source. I think the guy in the photo is using trays as heat sinks or something, but that’s not strictly necessary.
Essentially, arrange the two bottles so that they lie with their openings touching, one of them suspended above a fire for heat. Obviously, you’ll need to raise the other one on a platform of some kind to get them level.
Basically, the fire will eventually boil the seawater (removing waterborne pathogens as a bonus) and some, in vaporous form, will enter the other bottle. Here, it’ll cool, and become liquid water again, but without salt, which, of course, won’t evaporate at water boiling point.