It's tough, but definitely possible. The idea of desalinating seawater to make it suitable for human consumption dates back so far that Aristotle even wrote on the topic. Typically, heated seawater is put into tanks under low pressure, and as the water boils, the vapors are condensed into fresh water. Other ways to desalinate water include filtering the salt water through membranes or using electricity to filter out the salts (electrodialysis).
While scientists have the process down, there are some downsides. Heating up all that water for distillation requires a lot of energy, and although some desalination sites have power plants to harness the wasted heat, the purified water still ends up being at least twice as expensive as normal fresh water. Moreover, desalination plants are gigantic structures that can cost hundreds of millions of dollars to build.
The problem is that our need for fresh water is growing increasingly desperate. According to the World Health Organization, four out of every 10 people in the world suffer from water scarcity. And by 2025, almost 2 billion people will be living with less than the minimum amount necessary for a healthy and hygienic lifestyle. But despite the high costs, many areas are still betting on large-scale desalination as the answer to the looming freshwater shortage. More than 14,000 desalination plants are already up and running around the world. While some scientists feel the impending crisis can be alleviated through better conservation and management practices, buttressing these policies with desalination seems like the best plan we've got.