(covers information from several alternate timelines)
Swimming was an act of propelling oneself through water. This could be done for recreation, participation in a sport, or to stay alive. It could be done in natural bodies of water or artificial installations such as swimming pools.
In 1986, Spock swam alongside George and Gracie in a whale tank at the Cetacean Institute. He earned the trust of the whales and was able to mind meld with one of them. (Star Trek IV: The Voyage Home)
In 2286, when James T. Kirk was talking about converting the cargo bay of the HMS Bounty, Montgomery Scott asked him if he planned on taking a swim. Leonard McCoy replied, "Off the deep end, Mr. Scott." Later, after the HMS Bounty crashed into San Francisco Bay, the crew and the whales swam to safety. (Star Trek IV: The Voyage Home)
When the USS Enterprise-D was due at Pacifica for a science mission in 2364, Counselor Deanna Troi thought of taking a swim in the planet's ocean. Data wondered why Troi would anticipate this so much when the holodeck could replicate the experience, but Troi felt it just was not the same. Worf declined to join her in the experience, as he considering swimming to be too much like bathing. (TNG: "Conspiracy")
In 2369, when Jake Sisko was fishing in a holoprogram of Earth, he suggested to his father that they go swimming instead, as the fish were all "small fries," but there was no time, as they had to get ready for their arrival on Deep Space 9. (DS9: "Emissary")
In 2371, Chakotay was motivated by the desire to swim in the Gulf of Mexico and thus remained aboard the USS Voyager, as opposed to resettling on a Human colony in the Delta Quadrant. (VOY: "The 37's")
In 2375, while under the influence of a Borg vinculum, Seven of Nine proposed going swimming to Naomi Wildman. Naomi, however, said that she was not allowed to unless her mother was present. (VOY: "Infinite Regress")