Any object designed to float is based on a theory by Archimedes. His princible explains how things float.
The key of floating is that the object must displace an amount of water which is equal to its own weight.
Stability is also important. Stability means taht it si also designet not to tip over easily.