Under normal conditions, the resin in a water softener should last a long time, sometimes 15-20 years or more. In some cases though, the resin gets damaged and needs to be changed. This could be caused by high chlorine content in the water, or sand or iron from well-water, or a poor quality water softener to start with.
You can get a hint that the resin in your water softener is damaged if the water is not soft like it should be and it is still using up salt. If salt is not getting used up, then it may be a valve problem instead. A sure sign of damaged resin is when you see pieces of resin wash out of your faucet, usually reddish in color.
Replacing the resin depends on your particular water softener. For some it is more difficult than others. Usually, you are looking at about $100-$150 in new resin cost plus a few hours of your time. Most people opt for either a service call to their dealer or they call a local plumber. If you call a plumber, make sure he has experience with water softeners, preferaby with your brand.