Firstly, you need to know the exact depth of the pool in which you are going to practice swimming. Most swimming pools have their depth marked along the edges. For beginners it is important to be in depths where you can easily touch the bottom with your head still above the water.
Once you learn to walk in water and keep your body steady, move onto a pool where the water is deep enough to stop your feet from touching the bottom easily. However, the depth should be enough for you to climb out of the water with ease.
Now tread the water by kicking your legs slowly as you float in a vertical position. You need to practice this on a daily basis for a few days before you get the hang of it.
Do not be afraid, and experiment during this learning process. Learn to float on your back, for which you will need to take a deep breath. Floating on your back will teach you to rest on water when you get tired.
You need to practice holding your breath under water. Grab an edge of the pool and allow your body to float to the surface with you being on your stomach. Once your body becomes almost horizontal in the water, you have to start peddling your feet and legs. Practice staying afloat for about 20 to 30 seconds in every training session.
Now you need to develop the arm strokes. For this you have to push off the side of the pool and start peddling after taking a deep breath. Remember the strokes need to be smooth and well below the surface of the water, as this will propel you forward. With time, increase your capacity by swimming longer distances.