How people float is based on their specific density, so people who float have a lower density than people who don't float well. Specifically, people with a higher fat content in their bodies float better than people with a higher muscle content.
Fat is slightly less dense than water, and muscle is slightly denser. In water, a person is pushed down by gravity and up by buoyancy. When the two are equal, a person floats. Most people naturally float to some degree, as most bodies have enough fat on them. The amount of air in the lungs also strongly affects flotation.