Учиться means 'to learn' or 'to study'. It can be used without a direct object: Он быстро учится - He learns fast. It can also be used with a skill represented by a noun in dative case or by an infinitive: Он учится пению - Он учится петь - He learns to sing.
In contrast, учить is used with a noun in accusative case: Он учит стихотворение - He learns a poem (by heart). Учить can also mean 'to teach'.
Научить and научиться are just perfect forms of the corresponding verbs.
According to what I've studied in another site the verbs to swim and to sail are the same. The dictionary confirms this http://dictionary.reverso.net/russian-english/%D0%BF%D0%BB%D0%B0%D0%B2%D0%B0%D1%82%D1%8C
I checked out your link, I think you want to pay attention to the words in green parentheses. I think those are providing context on when that meaning is used.
When used with человек or животное (a person or an animal) it means to swim.
When used with корабль (a ship) it means to sail.
When used with лист or облако (a leaf or a cloud) it means to float.
It's weird English. "to swim" instead of "swimming" is much more natural English. The reasons is that "swimming" is a gerund, which in English is classified as a noun. The thing learned, however, is a set of actions, which is more suitable for a verb-form, the infinitive "to swim".
The distinction is not clear-cut, since both are verb-based. For example, you'd say "I learned to swim and I think that swimming is fun" - not "to swim is fun".
It's a question of degree - how much is a collection of actions, how much is a totality which lends itself to being regarded more as a total thing. Usually, when a verb-form is the subject of a sentence or clause, the gerund form is used, not the infinitive. Direct objects tend to be infinitives.
Often, it's a question of what sounds natural, which can't really be stated in a firm rule.