I remember doing a report in High School (40 years ago) about desalination plants taking ocean water and turning it into fresh water. IIRC, it was something about temperature and pressure changes and condensation. I think that Israel is using them a lot now.
Desalination is costly, but since the Saudis have petrodollars they operate large desalination plants.