My boys go to swimming lessons together. DS1 started at 4yrs 1 month, DS2 at the same time, so he was 2yrs 3 months. They are very good with him and he has one-to-one really within a small group (the instructors are in the water with the kids). They have been going now for about 6 months and DS2 has always enjoyed it - although the last few weeks he has cried quite a lot because he doesn't want to put his head under the water. I think this is just a stage they go through... but maybe harder for him to understand as he is so little (the others in the group are all older).
Whenever you can actually find lessons available! You'll probably find that either there aren't any classes for little ones near you, or that you work and they only take place midweek, midday, so you can't get to them anyway.
golly in NZ I took ds aged 4 months to a newborn/infant swimming class, where they basically drop the baby in the water and guess what the baby floats on its own! there were babies as young as 4 weeks there!
DS has never forgot and has always been able to swim properly from age 2 , mind you they push it in NZ as so much outside beach swimming there a re a lot of drownings.
dd loves swimming too she is 2.5 and can hold on to a board and kick and move.
I found that with my kids is that they don't really learn anything about swimming until they are 3 or 4.
They can have fun in the water beforehand, and that is fine. I don't really think that anything they "learn" is really going to give them a head-start. You don't have to fork out for lessons for the fun bit - a parent can do it themselves.
We took dd when she was about 2.9 as she had fallen in a swimming pool a couple of months before and she/I had a terrible shock. We thought she should learn to swim for safety. However, she didn't learn much as was really quite lazy letting us do all the work as it was a class where parents went in with them. After this years holiday we will try again but she will be nearer 5 yo by then.
From about 3 according to ds's swimming instructor... Ds had 8 one-to-one lessons and after the 4th lesson was swimming confidently in deep water (only a few meters to start with).
You do need a good instructor, though. Before that, I could never get ds to put his head under the water..