Under the Law of Moses in Ancient Israel certain imperfections and other criteria could disqualify the priest from serving in the tabernacle or, later, the Temple in Jerusalem.
Many of these disqualifications are applied to the continuing role of the kohen in the Mishnah, Talmud and later rabbinical literature, as well as in some schools of modern Judaism.
According to Orthodox Jewish practice, modern-day kohanim are obligated to guard against ritual defilement as prescribed by the Talmud.
The Talmud relates that when Judah haNasi died, the Priestly laws forbidding defilement through contact with the dead were suspended for his burial ceremony.
Due to a small doubt about this in the Talmud (Yevamos 45A-B), if such a marriage is performed the couple would not have to get divorced, see Shulchan Aruch 4:19.