Swimming is a survival skill to be learned. I enrolled my toddler to a swimming class. What was great about these classes was that the instructor was playing games with the kids. The children had to collect penguins, colorful blocks, ducks and balls floating in the pool and bring them back.
For the first few classes, my child hung to me like a monkey. I had to find a way to let him float on his own. I used the approach of gradually detaching myself physically from him for each class.
In my arms
Hold by my arms
No contact but physically close.