Is it permitted to go swimming on Shabbos?
The original prohibition as brought in the Gemarah Maseches Shabbos against swimming on Shabbos has to do with concern that one may perform "Gibul" - mushing the dirt at the side of the body of water into mud which would be a toldah of lash, kneading. As Yirmiyahu said there is also the concern of making a raft. Therefore in an outdoor pool most poskim do not permit it, (although R' Leizer Silver seemingly did. See http://hirhurim.blogspot.com/2007_01_01_archive.html). Indoor pools are permitted by a minority although most major poskim do not recommend it. Rav Moshe Feinstein writes that the minhag is that one should not immerse even in cold water on Shabbos unless it is for a mitzvah. (Igroth Moshe, Even Haezer 2,13.) There is also the concern of wringing out one's hair. There are those who say that going into the pool with a bathing suit on is laundering. Also see http://www.dafyomi.co.il/shabbos/insites/sh-dt-041.htm .
Swimming is prohibited (under most circumstances) out of concern that one might construct a [makeshift] raft.
Indeed, the prohibition against swimming is one of the reasons, as I recall, for the Ashkenazi practice not to bathe even in cold water on Shabbos (which itself precludes swimming in those situations where the prohibition isn't otherwise applicable). The prohibition against laundering prohibits entering the water while wearing clothes.
First, some context:
Unfortunately, the question of whether or not it is permissible according to the halakha to swim on Shabath has become yet another marker of one's neighbor's frumkeit and subsequently their commitment to sh'mirath ha-misswoth. Like so many other humroth that have been contrived in the name of "custom," this too has become a source of false religiosity and sinath hinam. Once again, we encounter those who would shake their fingers condescendingly at Hazal and the rishonim and instead choose to forbid the permitted - something which is just as detrimental and just as against the halakha as permitting what is forbidden.
The Talmudh Yerushalmi states in Masekheth Terumoth (5:3):
The Sefer Ha-Tashbess (siman 537) writes regarding this statement:
And this is the principle brought by nearly all of the poseqim.
As it will be seen, swimming (under certain reasonable constraints and conditions) is permitted by the gemara, the Mishneh Torah, a plethora of rishonim, and even the Shulhan Arukh. With all due respect to k'vodho ha-rav Feinstein (and others), the apparent Ashkenazi "custom" to forbid it, despite it being permitted explicitly by the sources, is dubious at best.
Now, to answer your question:
In MT Hilkhoth Shabath 23:5 it states:
So we see that it is indeed permissible to swim on Shabath, provided that it is in a pool, with a rim, within a valid `eruv.
[See also `Arokh HaShulhan, Hilkhoth Shabath, siman 339, se'iph 4 for a fuller explanation of the halakhic difference between swimming in a river or lake and swimming in a pool.]
Now, beside swimming itself there are several other issues raised by the occasion of swimming that have halakhic concerns, both regarding hilkhoth Shabath and otherwise:
The answers to these questions are a bit complex in their explanation, but I will attempt to answer them concisely.
A. There are many issues with regard to kibus that could be discussed, but essentially the question is whether one can get clothing wet and for what purpose. A clean suit worn into clean water is not considered kibus since it essentially effects nothing. As for drying, the second part of kibus, since people do not seek to immediately dry their suits but instead remove them while still wet, there is no issue there either. As for wringing out a bathing suit, as long as it is made of synthetic materials (such as polyester or nylon) there is absolutely no issue since we have a principle of "ein disha ela b'gidule qarqa` - there is no concern for [the melakha of] disha except with articles made of [plant] materials that grow from the ground" (cf. b.Shabath 75a et al). Therefore, there is no prohibition of squeezing synthetic materials (more on this in the next section). And even if one were to wear cotton while swimming, it would be fine as long as one does not wring them out or squeeze them - provided they are clean and the water is clean.
B. Pursuant to the previous section, wringing out wet hair also does not present a halakhic issue. It states explicitly in Mishne Tora (Hilkhoth Shabath 9:11) that there is no prohibition of "squeezing" or "wringing" (s'hitta) with regard to hair or leather. There are those who maintain that the Rambam holds here that there is no isur of s'hitta min ha-Tora, but a mi-divrehem prohibition still applies, however this is incorrect as is explained by the pirush of Rav Yosef Qafih z"l (there, #32). The hair or beard may be squeezed and wrung out on Shabath without any concern at all.
C. Mixed swimming is not permissible. There are those who are liberal who will certainly argue on this, but it is nevertheless not permitted for modesty reasons. The sources for this are abundant and there is no need to list them here. However, it appears l`aniyuth da'ati that immediate family swimming together while CLOTHED (i.e. not in underwear, bikinis, etc.) is perfectly fine. This may be derived from the laws permitting even qiruv basar while sleeping between nuclear family members in the same bed of the opposite gender. Once the child has shame, clothing or a blanket to separate between skin and skin is required. Swimming together while clothed in a private pool (without other people) should be fine, and the small children who are still toddlers unaware of their own bodies could swim in any bathing suit or even without clothing. [See MT Hilkhoth Isure Bi'a 21:6-7 et al].
D. The prohibition to heat water on Shabath is only in regard to the temperature of yadh soledeth bo (around 110 F). Thus, a slightly-warmed pool is not an issue. [See `Arokh HaShulhan, Hilkhoth Shabath, siman 326 , se'if 3]
In closing, there are those who claim that swimming is not in the "spirit" of Shabath. However, we must ask ourselves what determines this "spirit." It seems that Hazal felt that the "spirit" of Shabath was to be determined by the halakha - i.e. through prohibiting melakha, not discussing melakhoth, nor doing things that may lead to halakhoth. Swimming (within the guidelines set by Hazal) does not fit any of those descriptions. Instead, it seems that taking a permissible "dip" on the Seventh Day may actually fall into the category of `onegh Shabath (this view is also expressed by Rav Yisshaq Abadi shlit"a, as can be found on his website kashrut.org).
A helpful teshuva by Rav Rasson `Arusi shlit"a on this subject - containing much of what has been explained here - may be found HERE.
But hey, if you can't find a pool to swim in on Shabath, you can always swim in the hot miqwa'oth in town - these are permitted by even the most haredi of authorities.
Hope this helps. Kol tuv.