AFAIK, like with car tires, they will be changed when they reach certain limits. Things like flange depth and profile, and tire thickness, and of cource flats. Initially they would be reprofiled, but when they get beyond that they need changing. Again, like with a car, only the tires would be changed, but since it involves removing the whole wheelset, most of the time it will be swapped. If both axles need doing they might even swap the whole bogie. Depending on the equipment available it might be required to swap out the wheelset to reprofile too, although many depots have wheel lathes that can reprofile tires in situ. I don't think wheelsets are changed at all, unless they become damaged.