The two forces that determine whether an object floats or sinks are buoyancy and pressure. Buoyancy is determined by the density of the object and the density of the medium.
The property of being able to float or sink in mediums does not depend on the weight of the object. For an object to float, it must be less dense than the medium it is put in, creating a positive buoyant force. Pressure from the water creates an upthrust force that also determines whether an object sinks or floats. If the upthrust force is great enough, an object could float even though it would generally sink.