One of the vessels of the Tabernacle was the kiyor, a huge copper basin from which the kohanim would wash their hands and feet upon entering. They did this even if they were not “on duty,” as per the next verse, which states “when they come into the Tent of Meeting, they shall sanctify with water…” (30:20). The primary reason for this was spiritual purity, rather than simple physical cleanliness, similar to the way we wash our hands upon arising or prior to eating bread. (Before having a sandwich, one must wash even if one’s hands are spotless. If they are in fact filthy, one should clean them thoroughly with soap and water and dry them before washing for ritual purposes. Clearly, the washing we do is not about physical cleanliness.)
The reason underlying this mitzvah is respect for the Temple. It would be inappropriate for the kohanim to serve God without first sanctifying themselves. The kohanim had to do this at the beginning of their shifts. If they washed in the morning, they did not have to wash again that same night. The Talmud (Zevachim 19b-20b) has a spirited debate regarding if they washed at night, whether they would have to wash again the next morning if they worked the graveyard shift. (Think about the issues we have to address following a Shavuos all-nighter.) However, they definitely had to re-wash if they slept or used the bathroom.
The kohanim did not stick their hands into the basin. Rather, they poured water from it, similar to the way we do today. (The Torah says they are to sanctify their hands and feet “from it,” not “in it!”) If a kohein served without sanctifying himself, the service is invalid.
This obligation applies to male kohanim at a time when the Temple is standing. It is discussed in the Talmudic tractate of Zevachim from 19b-22b and is codified in the Mishneh Torah in the fifth chapter of Hilchos Bias HaMikdash. It is #24 of the 248 positive mitzvos in the Rambam’s Sefer HaMitzvos.