To archive a teacher, select Archive Staff Member on their record. It's best to only archive a teacher after they have completed all their attendance rolls and had their final pay advice slip.
Once the script has been run, you will still need to reallocate the teacher's remaining students and ensembles.
For information on changing the teacher for tuition enrolments see Permanently Change Teacher in Bulk.
To reallocate ensembles, navigate to the Ensemble Codes (Home Menu > Setup Files > Ensembles), select the affected ensemble, then select Staffing. Delete the archived teacher's Staff ID where it appears and enter the replacing teacher's Staff ID.