Old English swimman "to move in or on the water, float" (class III strong verb; past tense swamm, past participle swummen), from Proto-Germanic *swimjan (source also of Old Saxon and Old High German swimman, Old Norse svimma, Dutch zwemmen, German schwimmen), from PIE root *swem- "to be in motion."
The root is sometimes said to be restricted to Germanic, but according to OED possible cognates are Welsh chwyf "motion," Old Irish do-sennaim "I hunt," Lithuanian sundyti "to chase." The more common Indo-European word is *sna-. Transitive sense of "cross by swimming" is from 1590s. Sense of "reel or move unsteadily" first recorded 1670s; of the head or brain, from 1702. Figurative phrase sink or swim is attested from mid-15c., in early use often with reference to ordeals of suspected witches.