Defrock comes from frock, an old word for "dress." Priests, nuns, monks, and other church officials wear a frock to symbolize their job. If they leave the church, they are said to be defrocked: their gown is taken away.
Although it is still common to refer to defrocked priests (priests who have left the priesthood for one reason or another), the word does not have a generally-used meaning outside of the clergy. You would not refer to a "defrocked teacher" or a "defrocked coach."