The main reason we are able to float is that the density of our bodies is relatively less than the density of water. A large part of the human body is made up of air and water.
Buoyancy-the ability to float depends on the individual. But with experience it is possible to improve your body balance, in other words to distribute your weight evenly throughout your body. This makes floating easier.
In learning to float the beginner often experiences difficulty in keeping the legs horizontal. This can be remedied by extending the arms beyond the head to act as a counterbalance.