Bathing on Shabbos
1. It is forbidden to wash one's entire body or the majority of one's body
[on Shabbos] in hot water, even if the water was heated up before the
commencement of Shabbos (1). [This prohibition applies] even when washing
oneself limb by limb. It is forbidden to enter a bathhouse even for the
purpose of sweating. One may, however, wash one's face, hands, and feet
(2) with hot water that was heated before Shabbos (3).
(1) Originally, bathing in hot water heated before Shabbos was permitted.
However, the Sages discovered that many bathhouse owners were heating up
water on Shabbos itself, and claiming that they heated it up before
Shabbos. In response to this, the Sages prohibited bathing but still
allowed entering the bathhouse on Shabbos for the purpose of sweating. They
then discovered that people were entering bathhouses to bathe in hot water,
and then claiming that they only entered to sweat. Consequently, the Sages
prohibited entering the bathhouse even for sweating purposes (Shabbos 40).
(2) Or any other part of the body, as long as one doesn't wash the majority
of one's body.
(3) According to the Mishna Berura in his Be'ur Halacha (326:1), if one is
experiencing great discomfort, one may bathe in hot water which was heated
before Shabbos. Others disagree.