Whether an object in a fluid will float or sink depends on its density because:
Upthrust on an object is equal to the weight of the fluid it displaces
an object that is more dense than the fluid will sink because its weight is greater than the weight of the liquid displaced (and so greater than the upthrust)
an object that is less dense than the fluid will float because its weight is less than the weight of the fluid displaced (and so less than the upthrust).