In what condition does an object float in a liquid?
When an object is immersed in a liquid, the liquid exerts a force upwards on the object called 'Upthrust'. Also, the force due to gravitational attraction of the earth acts on the object downwards.
Upthrust is equal to the weight of the liquid displaced. So if density of the object is less than that of the liquid then lesser liquid has to be displaced in order to balance the weight of the object and thus the object floats.