I think the best age for a child to learn how to swim (actual swimming not just being comfortable in the water) depends on your child, but 3-4 is reasonable. My second son started swimming lessons at 3 and loved it so much he was swimming laps by 3.5. On the downside for him was that he flew through the levels so fast that he was in group lessons with children 5-6 years older than him. Socially, this was really tough on him and we ended up putting him in private lessons.
My third son though started swimming at 3 and lasted only one session with LOTS of coaxing even though he loved the water. He just was not ready to be able to follow instructions, take turns, etc. We tried again at 4, still not ready. Just before he turned 5, we tried once again and he took to swimming like a fish.
My fourth started swimming lessons at 3 as well, but it was mostly just getting her really comfortable in the water until she was about 4, then it really kinda clicked for her and she started learning the basic strokes.
We have gone to Foss, Lifetimes, YMCA, and community ed classes. Foss was wondeful, great instructors, small classes and warm water. But they are on the expensive side. Lifetime and YMCA are both fine reasonably priced and decent instructors. The community ed classes have been hit or miss. We have tried district 833 and were REALLY disappointed. Then went to district 622 and have been quite pleased with the instructors, but the group sizes are larger. We did private lessons through district 622 and they were fabulous (and still less than group lessons at Foss).