According to Archimedes' principle, when a body is immersed in liquid wholly or partially then an upward force called buoyant force acts on the body which is equal to the weight of the liquid displaced.
When the weight of the liquid displaced by immersed part of a body is equal to the total weight of the body, a body floats in a liquid.
This is the law of floatation.
While floating the weight of the floating body = Weight of the liquid displaced by its immersed part.