At the simplest, there are two steps; 1. Boil water 2. Collect the steam In practice, there is a little more to it. It is difficult to collect water vapor, or steam; it is much easier to collect...
You use distillation. Boil water and catch the subsequent steam. The steam will not contain the salt, which does not evaporate. Condense the steam and it will be pure water: 2 hydrogen, 1 oxygen.