Archimedes priciple states that when an object is immersed in a fluid, the upthrust on the object is equal in size to the weight of the fluid displaced by the object.
This principle enable ship made up of tons of steel floats easily on the surface of sea water if the buoyancy force that it recieves is great enough to overcome the downward force of its weight.
The same principle is also applied to enable the operation of a submarine which can float or dive under water. A submarine has a large ballast tank used to control the density and weight of the submarine.
To sink a submarine, the ballast tank is filled with water to increase the density and weight of the submarine and make it larger than the buoyancy force of the water.To float a submarine, water is is forced out of the ballast tank with compressed air thus decreases the density and weight of the submarine, when the buoyancy force of the water becomes larger than the density and weight of the submarine, it will easily floats.