The Sages forbade bathing the body in hot water on Shabbat. This is true even if the water was heated up in a permissible way (either before Shabbat or by a solar boiler). However, less than half of the body may be washed in water heated in a permissible fashion. Additionally, the entire body may be washed in lukewarm water. People who suffer great discomfort because they cannot wash their entire body (i.e., they feel particularly dirty or sweaty) may wash their whole body with hot water heated in a permissible way.
One may not swim on Shabbat (whether in a pool or a beach), because this is a weekday activity and not in the spirit of Shabbat.