I will focus on Freestyle. Before taking swim lessons, I was able to swim but without proper technique. Swimming can be a lot of fun, once you master the three fundamentals:
1.) Learn how to kick your legs: I know everyone knows this. I used to kick my legs vigorously without paying attention to keeping my legs straight. Your toes should be pointed, like ballerina, and kick using your thigh muscles. No bending the knees. Train yourself to kick hard with your thigh muscles, its the key.
2.) Learn how to use your hands: Its important to get your hands as high and forward as possible and then pull yourselves forward. Your hands should go all the way forward and enter the water at a 45 degree angle. Fingers together. Pull with your shoulder muscles.
3.) Knowing how and when to breathe: Probably the most difficult one. Your head should be underwater most of the time. One mistake I used to make was keep my head above all the time. No that’s not the right way to do it. You should learn to take a breath and release air from the mouth. At no point should you try to breathe when under water. Some people breathe every 3-5 strokes, whichever is convenient.
Swimming is all about getting these three right at once. So you have to train your mind to focus on these three aspects.
First, work on them individually and then combine them to become an expert swimmer.