Not an uncommon behavior if it's new in the tank, a combination of stress from bagging and transportation, settling into unfamiliar surroundings, unfamiliar food(s), etc. How a fish reacts to all of this can depend on the fish, sometimes also on your tank-- water, tankmates, aquascape, or sometimes whether it came in a species group or as a single fish, etc. You don't necessarily want a stressed fish eating much until stress levels/chemicals lower some because this can interfere with normal digestion (a new fish that's otherwise healthy and active may still be coming down off stress). Often the best solution is just giving it time. A few days, even a week, sometimes longer, isn't unheard of.
The basics of salt therapy are Epsom salt for internal problems and aquarium salt (or other forms of common salt) for external issues. Epsom salt is magnesium based, aquarium salt (common salt, canning salt, sea salt, etc.) is NACL, sodium chloride, and may or may not have other minerals in it, depending on the particular product.