Question:It is assur to wash on Shabbath with hot water, why then is it
permitted to dip oneself in a hot mikve on Shabbath?
The Mishnah Berurah in O.C. 326:7 cites the ruling of the Noda b'Yehudah who rules that a Mikvah may be used on Shabbos only if it is luke warm. However, he also refers to the Korban Nesanel in Shabbos 2:22 who rules that the Gezeirah of washing in hot water does not apply at all to immersion in a Mikvah. Many latter day Poskim are indeed divided over this matter:
(a) The Sidrei Taharah Y.D.193 permits a Nidah to immerse in hot water for her Tevilas Mitzvah, as does the Birkei Yosef in Y.D.197. Teshuvos Avnei Nezer O.C. 526 rules that since Tevilah for a man is also considered a Mitzvah, the same applies to men. He proves this by citing the Rokeach, Sefer haYashar and the Maharil who all permit Tevilah for a Ba'al Keri on Yom Kippur. If Tevilah for men is enough of a Mitzvah to overide the prohibition of washing on Yom Kippur, then it overides the Gezeirah of washing in hot water on Shabbos as well. (He emphasizes that one should be careful not to remain in the water for longer than is necessary.) Rav Moshe Sternbuch in Teshuvos v'Hanhagos 1:224 also rules that it is permissible to immerse in a hot water Mikvah on Shabbos. Rav Wosner, in Shevet Halevi 5:44 rules that at least if a man observes Tevilas Ezra consistently all year round, he can be lenient in the winter and immerse in hot water when necessary.
(b) On the other hand, Rav Moshe Feinstein (in the Teshuvos that appear in the appendix to Sefer Hilchos Shabbos by Rav Shimon Eider) writes that although people are lenient and permit Tevilah of a Ba'al Keri or of "Tosefes Kedushah" on Shabbos in cold water, it is forbidden in hot water. He adds that even though there are people who do so, it is not proper.
The Paytan says "Tehorim Yirashuha vi'Yekadshuha". May we be blessed to be Tehorim and Mekadshei haShabbos!