A person who has tzara’as, once it is identified by a kohein as such, must make it known that he has this affliction. The metzora must tear his clothes, let his hair grow, pull up his collar and pull his cloak over his head, and cry out, “Tamei! Tamei!” (“Unclean! Unclean!”) All this is so that other people will be warned not touch him in his state of impurity.
The reason for this mitzvah is to isolate the metzora. As previously stated, tzara’as is a Divine consequence of speaking ill of others. Just as his words separated people, he is separated from the community. The metzora should use his time away to reflect on his actions and resolve to change his ways.
This mitzvah applied to both men and women at a time when kohanim could diagnose tzara’as. The details of this mitzvah are discussed in the Mishna in tractate Negaim; in the Talmud, see tractate Arachin, pages 16a-b. It is codified in the Mishneh Torah in the tenth chapter of Hilchos Tumas Tzara’as and is #112 of the 248 positive mitzvos in the Rambam’s Sefer HaMitzvos.