Positive commandment · Mitzvat Aseh #37 of 613
For the priests to become ritually impure and mourn for their relatives in the same manner as other Jews who are commanded to mourn
להיות הכהנים מיטמאין לקרוביהם, ומתאבלין עליהן כשאר ישראל שהן מצווין להתאבל
The verse · Vayikra 21:3
וְלַאֲחֹתוֹ הַבְּתוּלָה הַקְּרוֹבָה אֵלָיו אֲשֶׁר לֹא־הָיְתָה לְאִישׁ לָהּ יִטַּמָּא
“and for his sister a virgin, that is near to him, and who has had no husband; for her may he be defiled.”
The Rambam’s words
For the priests to become ritually impure and mourn for their relatives in the same manner as other Jews who are commanded to mourn, as [Leviticus 21:3] states: "He shall become impure for her."
להיות הכהנים מיטמאין לקרוביהם, ומתאבלין עליהן כשאר ישראל שהן מצווין להתאבל, שנאמר: "לָהּ יִטַּמָּא" (ויקרא כא, ג).
Who & when
“And this commandment of the obligations of impurity for the dead body of a relative is practiced by a priest in every place and at all times.”
Where in the Mishneh Torah
Hilchot Mourning הלכות אבל