"To learn" is the correct phrase to indicate the purpose or intention of taking lessons.
Options (A) "learn," (B) "for learning," and (D) "learning" are not suitable in this context. The preposition "to" is needed to connect with the phrase "how to swim."
Doubts & discussion
Not sure why the answer is C? Ask here and get an explanation.