Chapter 86:7
Bathing on Shabbos
7. It is forbidden, on Shabbos, to bathe in water that one would usually
only enter for medicinal purposes ("Refuah"), for example, noxious or foul
water, because it is obvious that one is doing so for the purpose of
healing (1).
When does this apply? When one lingers in it (2). If one does not linger,
it is permitted, for it appears that [one is immersing] to merely cool off.
(3). In hot springs like those of Tiberias, if, in general, people only
immerse in them for medicinal purposes, it is forbidden to immerse in them
on Shabbos, even when one does not linger (4).
FOOTNOTES:
(1) The Sages prohibited doing anything for healing purposes on Shabbos,
except where absolutely essential, because they were concerned that one may
come to grind substances for use as medicine; "grinding" ("Tochen") is one
of the 39 Avos Melachos (prototype prohibited activity - see
Halacha Yomi 80:15, note (1)).
(2) If one lingers, it is clear to all that one is certainly immersing for
medicinal purposes, for that is the only reason one would remain in
disgusting water for more than a short time.
(3) People could assume that the person was unable to find cleaner waters
in which to cool off. Remaining in this type of water for a short time is
permissible even if one's intent is for healing purposes, as long as it is
not obvious to onlookers that this is the intent.
(4) Obviously, in the case of hot springs, onlookers can't assume that the
person is cooling off, and thus, even immersing for a short time is
prohibited. However, according to the Mishna Berura 328:137, immersing in
hot springs for a short time is permissible. Also, the prohibition only
applies to someone who is bathing in these springs to alleviate slight
discomfort, however, when one is actually ill, it is permissible to bathe
in them.