Never use food salt in a pool, it contains additives that can cause stains. But you can use water softener salt from Lowes/Home Depot/similar places. Look for salt that is 99.4% pure or better and doesn't have any rust inhibitor or other additives. The best choices include Diamond Crystal® Solar Salt Extra Coarse Crystals in blue bags, Morton® White Crystal® Water Softener Salt in blue bags, or Diamond Crystal® Sun Gems® Crystals Water Softener Salt in yellow bags.
Water softener salt is ideal for pools. It is actually the exact same salt that is used for pool salt, the only difference being that pool salt is ground more finely. Even the large crystals dissolve very quickly so the grind doesn't matter. Every once in a very long while there is a small pebble in one of the bags, but those are easy enough to pick up afterwards.