A number of factors come into play. It must be decided, for example, if a serious offence is involved or not. This depends on the circumstances. Or it can be a person appointed for an indeterminate period, that is to say, whose appointment has no fixed end date, and who is told that it is time to change the leadership, to move on, but for whom no other position is offered. In those circumstances, an order is issued to end the appointment that was previously indeterminate. It depends on the situation, on the time remaining until the end of the appointment.
If the person has committed a serious offence, there is no effort to offer him or her compensation. On the other hand, if the government and the appointee come to the conclusion that it is time to move on, there can be negotiations intended to come to an amicable understanding.