All objects in a fluid experience two opposed forces in the vertical direction: gravity (determined by the mass of the object) and buoyancy (determined by the density of the fluid and the volume of liquid displaced by the object).
The vertical forces experienced by objects in a fluid are gravity (mass-dependent) and buoyancy (density-dependent).