First of all sea water is collected at a place having large surface area. Then it is left to let water evaporate due to heat of sunlight falling on it. And then the salts are left in place which are moved from there to other places.
The salt we use in our food is also obtained by same process.