What kind of effects does it have on actors bodies when they keep on losing weight, gaining weight gaining muscle and losing muscle for various roles?

Is this unhealthy and does it cause irreparable damage to the body when actors or even athletes do this for various reasons?