In order to swim you must first learn how to hold your breath 10-15-20 seconds with your mouth open (I'll explain why later). You float first and swim second. Any good instructor will insist you learn how to do several kinds of floating skills before starting to push off and glide, kick, or start stroking.
Most of us have layers of fat and can inflate our lungs. A hot dog floats and it's only a piece of meat without lungs. It's hard to sink a beach ball full of air so all you have to do is take in a deeper breath and learn to breath off the top 10% with small breaths to keep your lungs more fully inflated. This way if caught in a current you can go with the flow and move toward safety rather than try to fight the water. The water always wins because it's far more powerful. Just fill up a 5 gal. home improvement bucket and lift it. That weighs 42 lbs.!
If you lie down on your mattress at home you'll get spatial awareness of what level body position you have to do. Then you can lie down on the top concrete step into a pool in only 6-8" of water, take a deep breath, put your head down in between your arms to look straight down, and feel your body start to float.
You may think you can't float because you are not level like an air mattress to displace water evenly. Archimedes Principle of physics states that you are buoyed up by a force equal to the weight of the water you displace. Big ships float because they displace tons of water. One cubic foot weighs 62.5 lbs. and to float your body mass with lungs inflated will easily displace more weight than a few cubic feet.
The reason why you think you can't float is probably because you are not level and are vertical with your feet and legs down. Like an iceberg 7/8ths of your body is underwater and unfortunately that starts just above your nose with the remainder only the top of our head.
This video will show you how you can teach yourself to float in a few positions so you can relax and be like a hot dog.
Teach Yourself (or Your Kids) to Swim is a series of 14 brief courses. I use a new system of easy-to-master one-minute steps you can easily teach yourself or others to do. But you must follow my sequence and master each small step before moving on to learn the next step. All my content is based on physics and psychology of learning principles that are proven to get you faster longer-last...