Anybody with a 5-year-old’s knowledge of geography might come up against this conundrum: There’s a water shortage in the Western United States. Right next door, there’s the Pacific Ocean. Why can’t we take some of that big, blue body of water and move it into the increasingly parched territory that borders it?

The short answer, of course, is that there’s salt in the ocean, which isn’t good for people, plants and many other living creatures. But as shortages mount, there’s increasing interest in the complicated process of desalination, or pulling out salt on a massive scale so that water can be put to use by the thirsty populations who live nearby.

Wells are drying up in California. The Colorado River is thinning to a dribble. The levels of Lake Mead and Lake Powell — the two biggest reservoirs in the United States — are at record lows.

There is precedent for large-scale desalination: Persian Gulf countries such as Qatar have precious little drinking water, and they have invested in the costly technology needed to filter the salt out of saltwater and pass the cleaned-up liquid to their entire society.

“Desalination can be a sustainable way to replenish our water cycle,” wrote the authors of a European Commission-backed study last year that argued for wider use of desalination around the world, in partnership with efforts to minimize its environmental impact.

But the process is energy-intensive, costly and complicated to manage in an Earth-friendly way. Here’s what you need to know.

So what is desalinated water, anyway?

Desalination is the process of getting salt out of saltwater so that it’s drinkable and usable on land. There are two main techniques: You can boil the water, then catch the steam, leaving behind the salt. Or you can blast the water through filters that catch the salt but let the liquid through. The latter is the more modern process, but both methods use a lot of energy.

And is desalinated water safe to drink?

Generally, yes. Desalinated water, provided that it’s clean, is perfectly fine to drink, and a lot of it is already being consumed both in the United States and abroad. San Diego inaugurated a vast new desalination plant about six years ago and is on the verge of approving another. Other plants dot the West Coast. Desalination has been in use in energy-rich, freshwater-poor parts of the world for decades — about half of global production is concentrated in the Middle East and North Africa. A United Nations-sponsored study from 2018 estimated that the world produces about 25 billion gallons of desalinated water every day — enough to fill the taps of 25 New York Cities.

But cleaning up the water isn’t challenge-free. Salt isn’t the only thing that hangs out in seawater: There’s also often a lot of boron, which isn’t good for crops and in large concentrations might be unhealthy for humans. And it isn’t always easy to clean saltwater. Other contaminants can also get in.

There is an urgent need to make desalination technologies more affordable and extend them to low-income and lower-middle-income countries,” Vladimir Smakhtin, director of the United Nations University Institute for Water, Environment and Health, wrote after he co-wrote the U.N. study on desalination. “At the same time, though, we have to address potentially severe downsides of desalination — the harm of brine and chemical pollution to the marine environment and human health.”

Why do people get excited about desalination?

At its best, desalination is an attractive technology: It takes a relatively abundant but unusable resource, seawater, and turns it into something useful for freshwater-starved regions. And as time passes, it’s becoming more efficient, less costly and more possible to fuel with renewable energy, easing the environmental impact. Eventually, backers hope, extracting the minerals from the high-salt leftovers will become economically viable, even though it’s usually not right now.

At best, said the authors of the E.U. study, desalination can be “a far-reaching, climate change mitigating, water security solution.”

Is desalination bad for the environment?

Opponents of desalination have long said that the technique isn’t a panacea because it hurts the environment even as it cleans up water for human consumption. There are a few big challenges. Pulling saltwater into desalination plants can hurt fish and other marine life if it isn’t done carefully. Then there’s the energy needed to clean up the water, and the brackish, salty waste that is left after the clean water is filtered out.

Proponents of desalination “think it’s table salt. They think the ocean can sustain the damage, but over 50 years, the ocean cannot sustain the damage, and neither can the atmosphere,” said Susan Jordan, the executive director of the California Coastal Protection Network and a longtime critic of big desalination projects in her state.

There’s no question that desalination is energy-intensive. And if that energy comes from dirty sources, desalination can lead to a paradoxical outcome: It can unleash greenhouse gases, worsening global warming, increasing droughts and therefore the need for more desalination.

The most modern desalination plants use significantly less energy than their predecessors. And proponents are looking for ways to use renewable energy to power the process.

A separate challenge is brine, the hyper-concentrated, salty fluid that is flushed away from the freshwater. If it is simply pumped straight back into the sea, the dense substance sinks to the bottom of the ocean floor and suffocates marine life. There are techniques to spread it over greater territory in the sea, diluting its impact.

“We call it the blanket of death because it settles on the floor, and it kills everything,” Jordan said.

Can desalination solve the water crisis?

Alone, no. But it might help as part of a broader range of efforts to cut water use and increase water supplies. Its technologies are growing more energy-efficient, and there are new ways to reduce the environmental harm of the salty wastewater. And it could be used in especially parched parts of the world where water is desperately needed and where there are few alternatives.

“The benefits of desalination go beyond the single-use value of the water produced,” the authors of the E.U. study argued last year, advocating for wider use of desalination in more-vulnerable and poorer regions of the globe. The technology can provide “plentiful water for human use, with all the benefits that entails, while helping preserve and restore ecosystems.”

But in the United States, even proponents of the technology say desalination is likely to supply only a sliver of the American West’s water needs in the coming years, leaving some of the biggest water users — notably the agriculture industry — to look for water elsewhere.

Los Angeles recently unveiled a $3.4 billion proposal to recycle and reuse its wastewater, for example, instead of treating the waste and pumping it into the ocean, as is currently done. Advocates say the change would significantly ease the pressure on the city’s water sources further north in California and the Colorado River — all without the need to lean more heavily on desalination.

“Conservation, recycling, all of those things are important first,” Jordan said. “And if you can’t solve your water supply problem, then that’s when we say, ‘Do desal, but do it right.’”