Explanation
"how to swim" is the most grammatically correct and natural way to express the idea that someone doesn't understand the process or technique of swimming.
"swimming" is a noun and doesn't fit the sentence structure.
"to swim": is an infinitive and, while related, doesn't directly convey the idea of knowing how to do something.
"How can he swim?": is a question, not a statement
****