I took swimming lessons from the town pool in the small town where I grew up. The first year I was too scared, and my mom pulled me from the class after the first lesson or two when I just ran outside the pool to where she was with the other mothers. I think it was the summer I was 5.
The next year, I took to it easily. They told us to hold our noses when we went under water, but then I figured out how to just hold my breath, and I was off and running. Then it was just learn to paddle with my arms and kick with my feet. You can just swim with your head out of water, or you can lay your head in the water and turn it every stroke to get a quick breath.
Swimming with your head out of water makes your legs and torso hang lower in the water, which creates drag, but you can still move easily enough through the water this way. Laying your head down makes it easier for your legs to float so you have have the most streamlined position in the water, and can swim the fastest. I'd learn to swim with your head out of water first, because then breathing is no issue. Once you master movement through water, then you can work on the fine points of breath control.
Here's a video about this.
Once you can swim like this, you are free to learn all the other things like swimming under water, treading water, back stroke, and all the rest.