When a parish becomes vacant or when a pastor is prevented from exercising his pastoral function in the parish by reason of captivity, exile or banishment, incapacity or ill health, or some other cause, the diocesan bishop is to designate as soon as possible a parochial administrator, that is, a priest who takes the place of the pastor according to the norm of can. 540.
Source: Code of Canon Law (Vatican.va)