It's not quite as simple as you are imagining it to be, but using geothermal heat as part of a multi-effect distillation plant or other type of plant is proven tech. But the prime use is for preheat. All the fun stuff still happens on the surface with vacuum distillation and membrane systems working on the preheated brackish water. For seawater desalination, you basically need to park the desalination plant next to a powerplant and use higher quality waste heat (a lot of it). But for mildly brackish water, geothermal preheat can be adequate and plonking down a plant near accessible geothermal sources is perfectly reasonable.
The simple system would to extract hot mineral water from a geothermal water well and immediately purify it. There are more dissolved minerals in hot water, but it can still work out depending on what they are. But you can also run a heat exchanger loop to transfer the heat to a better water supply if available. The geothermal heat can be put to use in myriad ways, with temperature-driven membrane purification probably the most promising. But you also need a cold side for this to work well.
Of course, if you are sitting on top of a wicked good geothermal source you can handle about anything.
In the first phase of the Aqua Genesis plan to remedy the Salton Sea, a complex of Firestone's units would be assembled at the Sea's Bombay Beach near Niland, California. (Eventually the company plans to produce over 5000 of the units at a factory in Nevada.) The plant would siphon Salton Sea water, which has a percentage point higher salinity level than ocean water's 3.5 percent. The water would then be heated with geothermal energy drawn from 4700 feet below ground. Geologists, according to Firestone, know water in the area at that depth to be 656 degrees F. Once its heat has been taken and its pressure used to move Salton Sea water through the plant, the operation would return the groundwater to its source.
PS, we expect a modicum of research before asking here, and that might include discovering the Wikipedia article on Geothermal Desalination. Its not a great read, but it would lead you to other sources of information.