As we mentioned in Mitzvah #173, ritual immersion is a standard part of the purification process. The Torah tells us (Leviticus 11:36) that immersion takes place in a “gathering of waters” (“mikvei mayim”), hence the name “mikvah” for the immersion pool. The water in a mikvah may not be manually drawn. It is either a natural body of water or collected from a gathering of rain.
The fact that immersion in a mikvah is a mitzvah for those who are ritually impure does not mean that they are all obligated to go to the mikvah. Some people may choose to remain in their ritually impure state. Such is their prerogative, although then there may be certain places they may not go and certain things they may not eat. If one wants to rid himself of these restrictions, then he must use the mikvah. (The Sefer HaChinuch adds some words of rebuke for those who would choose to remain in a state of uncleanliness.)
The reason for this mitzvah is that water is strongly associated with cleanliness. The message of mikvah is to clean our souls of spiritual stains just as we cleanse our bodies of physical dirt.
This mitzvah applies to both men and women in all times and places, though most forms of ritual purity have no practical impact nowadays in the absence of the Temple and sacrifices. The details of this mitzvah are discussed in the Mishna in the tractate of Mikvaos. This mitzvah is codified in the Shulchan Aruch in Yoreh Deah 198 and is #109 of the 248 positive mitzvos in the Rambam’s Sefer HaMitzvos. It is not counted in the Sefer HaMitzvos HaKatzar of the Chofetz Chaim.